<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998

Taken quite directly from the Peyton Jones/Lester paper.
-}</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-9"></span><span>
</span><span id="line-10"></span><span class="hs-comment">-- | A module concerned with finding the free variables of an expression.</span><span>
</span><span id="line-11"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Core.FVs</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-12"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Free variables of expressions and binding groups</span></span><span>
</span><span id="line-13"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprFreeVars"><span class="hs-identifier">exprFreeVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprFreeVarsDSet"><span class="hs-identifier">exprFreeVarsDSet</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprFreeVarsList"><span class="hs-identifier">exprFreeVarsList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprFreeIds"><span class="hs-identifier">exprFreeIds</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprFreeIdsDSet"><span class="hs-identifier">exprFreeIdsDSet</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprFreeIdsList"><span class="hs-identifier">exprFreeIdsList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprsFreeIdsDSet"><span class="hs-identifier">exprsFreeIdsDSet</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprsFreeIdsList"><span class="hs-identifier">exprsFreeIdsList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprsFreeVars"><span class="hs-identifier">exprsFreeVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprsFreeVarsList"><span class="hs-identifier">exprsFreeVarsList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#bindFreeVars"><span class="hs-identifier">bindFreeVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Selective free variables of expressions</span></span><span>
</span><span id="line-26"></span><span>        </span><span class="annot"><a href="GHC.Utils.FV.html#InterestingVarFun"><span class="hs-identifier">InterestingVarFun</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprSomeFreeVars"><span class="hs-identifier">exprSomeFreeVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#exprsSomeFreeVars"><span class="hs-identifier">exprsSomeFreeVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprSomeFreeVarsList"><span class="hs-identifier">exprSomeFreeVarsList</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#exprsSomeFreeVarsList"><span class="hs-identifier">exprsSomeFreeVarsList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Free variables of Rules, Vars and Ids</span></span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#varTypeTyCoVars"><span class="hs-identifier">varTypeTyCoVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#varTypeTyCoFVs"><span class="hs-identifier">varTypeTyCoFVs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#idUnfoldingVars"><span class="hs-identifier">idUnfoldingVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#idFreeVars"><span class="hs-identifier">idFreeVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#dIdFreeVars"><span class="hs-identifier">dIdFreeVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#bndrRuleAndUnfoldingVarsDSet"><span class="hs-identifier">bndrRuleAndUnfoldingVarsDSet</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#idFVs"><span class="hs-identifier">idFVs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#idRuleVars"><span class="hs-identifier">idRuleVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#idRuleRhsVars"><span class="hs-identifier">idRuleRhsVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#stableUnfoldingVars"><span class="hs-identifier">stableUnfoldingVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#ruleFreeVars"><span class="hs-identifier">ruleFreeVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#rulesFreeVars"><span class="hs-identifier">rulesFreeVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#rulesFreeVarsDSet"><span class="hs-identifier">rulesFreeVarsDSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#mkRuleInfo"><span class="hs-identifier">mkRuleInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#ruleLhsFreeIds"><span class="hs-identifier">ruleLhsFreeIds</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#ruleLhsFreeIdsList"><span class="hs-identifier">ruleLhsFreeIdsList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#ruleRhsFreeVars"><span class="hs-identifier">ruleRhsFreeVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#ruleRhsFreeIds"><span class="hs-identifier">ruleRhsFreeIds</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier">expr_fvs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Orphan names</span></span><span>
</span><span id="line-45"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier">orphNamesOfType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier">orphNamesOfCo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfAxiom"><span class="hs-identifier">orphNamesOfAxiom</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfTypes"><span class="hs-identifier">orphNamesOfTypes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCoCon"><span class="hs-identifier">orphNamesOfCoCon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#exprsOrphNames"><span class="hs-identifier">exprsOrphNames</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfFamInst"><span class="hs-identifier">orphNamesOfFamInst</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Core syntax tree annotation with free variables</span></span><span>
</span><span id="line-50"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#FVAnn"><span class="hs-identifier">FVAnn</span></a></span><span class="hs-special">,</span><span>                  </span><span class="hs-comment">-- annotation, abstract</span><span>
</span><span id="line-51"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs"><span class="hs-identifier">CoreExprWithFVs</span></a></span><span class="hs-special">,</span><span>        </span><span class="hs-comment">-- = AnnExpr Id FVAnn</span><span>
</span><span id="line-52"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs%27"><span class="hs-identifier">CoreExprWithFVs'</span></a></span><span class="hs-special">,</span><span>       </span><span class="hs-comment">-- = AnnExpr' Id FVAnn</span><span>
</span><span id="line-53"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#CoreBindWithFVs"><span class="hs-identifier">CoreBindWithFVs</span></a></span><span class="hs-special">,</span><span>        </span><span class="hs-comment">-- = AnnBind Id FVAnn</span><span>
</span><span id="line-54"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#CoreAltWithFVs"><span class="hs-identifier">CoreAltWithFVs</span></a></span><span class="hs-special">,</span><span>         </span><span class="hs-comment">-- = AnnAlt Id FVAnn</span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#freeVars"><span class="hs-identifier">freeVars</span></a></span><span class="hs-special">,</span><span>               </span><span class="hs-comment">-- CoreExpr -&gt; CoreExprWithFVs</span><span>
</span><span id="line-56"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#freeVarsBind"><span class="hs-identifier">freeVarsBind</span></a></span><span class="hs-special">,</span><span>           </span><span class="hs-comment">-- CoreBind -&gt; DVarSet -&gt; (DVarSet, CoreBindWithFVs)</span><span>
</span><span id="line-57"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier">freeVarsOf</span></a></span><span class="hs-special">,</span><span>             </span><span class="hs-comment">-- CoreExprWithFVs -&gt; DIdSet</span><span>
</span><span id="line-58"></span><span>        </span><span class="annot"><a href="GHC.Core.FVs.html#freeVarsOfAnn"><span class="hs-identifier">freeVarsOfAnn</span></a></span><span>
</span><span id="line-59"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html"><span class="hs-identifier">GHC.Types.Id.Info</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html"><span class="hs-identifier">GHC.Types.Name.Set</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html"><span class="hs-identifier">GHC.Types.Unique.Set</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier">Uniquable</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html"><span class="hs-identifier">GHC.Types.Var.Set</span></a></span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html"><span class="hs-identifier">GHC.Core.TyCo.Rep</span></a></span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.FVs.html"><span class="hs-identifier">GHC.Core.TyCo.FVs</span></a></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Coercion.Axiom.html"><span class="hs-identifier">GHC.Core.Coercion.Axiom</span></a></span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html"><span class="hs-identifier">GHC.Core.FamInstEnv</span></a></span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.html"><span class="hs-identifier">GHC.Builtin.Types</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.html#unrestrictedFunTyConName"><span class="hs-identifier">unrestrictedFunTyConName</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.Prim.html"><span class="hs-identifier">GHC.Builtin.Types.Prim</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.Prim.html#funTyConName"><span class="hs-identifier">funTyConName</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-82"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html"><span class="hs-identifier">GHC.Data.Maybe</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html#orElse"><span class="hs-identifier">orElse</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-84"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Activation"><span class="hs-identifier">Activation</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-85"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-86"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html"><span class="hs-identifier">GHC.Utils.FV</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">FV</span></span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\section{Finding the free variables of an expression}
*                                                                      *
************************************************************************

This function simply finds the free variables of an expression.
So far as type variables are concerned, it only finds tyvars that are

        * free in type arguments,
        * free in the type of a binder,

but not those that are free in the type of variable occurrence.
-}</span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span class="hs-comment">-- | Find all locally-defined free Ids or type variables in an expression</span><span>
</span><span id="line-105"></span><span class="hs-comment">-- returning a non-deterministic set.</span><span>
</span><span id="line-106"></span><span class="annot"><a href="GHC.Core.FVs.html#exprFreeVars"><span class="hs-identifier hs-type">exprFreeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-107"></span><span id="exprFreeVars"><span class="annot"><span class="annottext">exprFreeVars :: CoreExpr -&gt; VarSet
</span><a href="GHC.Core.FVs.html#exprFreeVars"><span class="hs-identifier hs-var hs-var">exprFreeVars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; (CoreExpr -&gt; FV) -&gt; CoreExpr -&gt; VarSet
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#exprFVs"><span class="hs-identifier hs-var">exprFVs</span></a></span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span class="hs-comment">-- | Find all locally-defined free Ids or type variables in an expression</span><span>
</span><span id="line-110"></span><span class="hs-comment">-- returning a composable FV computation. See Note [FV naming conventions] in &quot;GHC.Utils.FV&quot;</span><span>
</span><span id="line-111"></span><span class="hs-comment">-- for why export it.</span><span>
</span><span id="line-112"></span><span class="annot"><a href="GHC.Core.FVs.html#exprFVs"><span class="hs-identifier hs-type">exprFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-113"></span><span id="exprFVs"><span class="annot"><span class="annottext">exprFVs :: CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#exprFVs"><span class="hs-identifier hs-var hs-var">exprFVs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalVar"><span class="hs-identifier hs-var">isLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; (CoreExpr -&gt; FV) -&gt; CoreExpr -&gt; FV
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span>
</span><span id="line-114"></span><span>
</span><span id="line-115"></span><span class="hs-comment">-- | Find all locally-defined free Ids or type variables in an expression</span><span>
</span><span id="line-116"></span><span class="hs-comment">-- returning a deterministic set.</span><span>
</span><span id="line-117"></span><span class="annot"><a href="GHC.Core.FVs.html#exprFreeVarsDSet"><span class="hs-identifier hs-type">exprFreeVarsDSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>
</span><span id="line-118"></span><span id="exprFreeVarsDSet"><span class="annot"><span class="annottext">exprFreeVarsDSet :: CoreExpr -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#exprFreeVarsDSet"><span class="hs-identifier hs-var hs-var">exprFreeVarsDSet</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; DVarSet
</span><a href="GHC.Utils.FV.html#fvDVarSet"><span class="hs-identifier hs-var">fvDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; DVarSet) -&gt; (CoreExpr -&gt; FV) -&gt; CoreExpr -&gt; DVarSet
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#exprFVs"><span class="hs-identifier hs-var">exprFVs</span></a></span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span class="hs-comment">-- | Find all locally-defined free Ids or type variables in an expression</span><span>
</span><span id="line-121"></span><span class="hs-comment">-- returning a deterministically ordered list.</span><span>
</span><span id="line-122"></span><span class="annot"><a href="GHC.Core.FVs.html#exprFreeVarsList"><span class="hs-identifier hs-type">exprFreeVarsList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-123"></span><span id="exprFreeVarsList"><span class="annot"><span class="annottext">exprFreeVarsList :: CoreExpr -&gt; [Var]
</span><a href="GHC.Core.FVs.html#exprFreeVarsList"><span class="hs-identifier hs-var hs-var">exprFreeVarsList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; [Var]
</span><a href="GHC.Utils.FV.html#fvVarList"><span class="hs-identifier hs-var">fvVarList</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; [Var]) -&gt; (CoreExpr -&gt; FV) -&gt; CoreExpr -&gt; [Var]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#exprFVs"><span class="hs-identifier hs-var">exprFVs</span></a></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="hs-comment">-- | Find all locally-defined free Ids in an expression</span><span>
</span><span id="line-126"></span><span class="annot"><a href="GHC.Core.FVs.html#exprFreeIds"><span class="hs-identifier hs-type">exprFreeIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#IdSet"><span class="hs-identifier hs-type">IdSet</span></a></span><span>        </span><span class="hs-comment">-- Find all locally-defined free Ids</span><span>
</span><span id="line-127"></span><span id="exprFreeIds"><span class="annot"><span class="annottext">exprFreeIds :: CoreExpr -&gt; VarSet
</span><a href="GHC.Core.FVs.html#exprFreeIds"><span class="hs-identifier hs-var hs-var">exprFreeIds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; CoreExpr -&gt; VarSet
</span><a href="GHC.Core.FVs.html#exprSomeFreeVars"><span class="hs-identifier hs-var">exprSomeFreeVars</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalId"><span class="hs-identifier hs-var">isLocalId</span></a></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span class="hs-comment">-- | Find all locally-defined free Ids in an expression</span><span>
</span><span id="line-130"></span><span class="hs-comment">-- returning a deterministic set.</span><span>
</span><span id="line-131"></span><span class="annot"><a href="GHC.Core.FVs.html#exprFreeIdsDSet"><span class="hs-identifier hs-type">exprFreeIdsDSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DIdSet"><span class="hs-identifier hs-type">DIdSet</span></a></span><span> </span><span class="hs-comment">-- Find all locally-defined free Ids</span><span>
</span><span id="line-132"></span><span id="exprFreeIdsDSet"><span class="annot"><span class="annottext">exprFreeIdsDSet :: CoreExpr -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#exprFreeIdsDSet"><span class="hs-identifier hs-var hs-var">exprFreeIdsDSet</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; CoreExpr -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#exprSomeFreeVarsDSet"><span class="hs-identifier hs-var">exprSomeFreeVarsDSet</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalId"><span class="hs-identifier hs-var">isLocalId</span></a></span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span class="hs-comment">-- | Find all locally-defined free Ids in an expression</span><span>
</span><span id="line-135"></span><span class="hs-comment">-- returning a deterministically ordered list.</span><span>
</span><span id="line-136"></span><span class="annot"><a href="GHC.Core.FVs.html#exprFreeIdsList"><span class="hs-identifier hs-type">exprFreeIdsList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- Find all locally-defined free Ids</span><span>
</span><span id="line-137"></span><span id="exprFreeIdsList"><span class="annot"><span class="annottext">exprFreeIdsList :: CoreExpr -&gt; [Var]
</span><a href="GHC.Core.FVs.html#exprFreeIdsList"><span class="hs-identifier hs-var hs-var">exprFreeIdsList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; CoreExpr -&gt; [Var]
</span><a href="GHC.Core.FVs.html#exprSomeFreeVarsList"><span class="hs-identifier hs-var">exprSomeFreeVarsList</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalId"><span class="hs-identifier hs-var">isLocalId</span></a></span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span class="hs-comment">-- | Find all locally-defined free Ids in several expressions</span><span>
</span><span id="line-140"></span><span class="hs-comment">-- returning a deterministic set.</span><span>
</span><span id="line-141"></span><span class="annot"><a href="GHC.Core.FVs.html#exprsFreeIdsDSet"><span class="hs-identifier hs-type">exprsFreeIdsDSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DIdSet"><span class="hs-identifier hs-type">DIdSet</span></a></span><span> </span><span class="hs-comment">-- Find all locally-defined free Ids</span><span>
</span><span id="line-142"></span><span id="exprsFreeIdsDSet"><span class="annot"><span class="annottext">exprsFreeIdsDSet :: [CoreExpr] -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#exprsFreeIdsDSet"><span class="hs-identifier hs-var hs-var">exprsFreeIdsDSet</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; [CoreExpr] -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#exprsSomeFreeVarsDSet"><span class="hs-identifier hs-var">exprsSomeFreeVarsDSet</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalId"><span class="hs-identifier hs-var">isLocalId</span></a></span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span class="hs-comment">-- | Find all locally-defined free Ids in several expressions</span><span>
</span><span id="line-145"></span><span class="hs-comment">-- returning a deterministically ordered list.</span><span>
</span><span id="line-146"></span><span class="annot"><a href="GHC.Core.FVs.html#exprsFreeIdsList"><span class="hs-identifier hs-type">exprsFreeIdsList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>   </span><span class="hs-comment">-- Find all locally-defined free Ids</span><span>
</span><span id="line-147"></span><span id="exprsFreeIdsList"><span class="annot"><span class="annottext">exprsFreeIdsList :: [CoreExpr] -&gt; [Var]
</span><a href="GHC.Core.FVs.html#exprsFreeIdsList"><span class="hs-identifier hs-var hs-var">exprsFreeIdsList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; [CoreExpr] -&gt; [Var]
</span><a href="GHC.Core.FVs.html#exprsSomeFreeVarsList"><span class="hs-identifier hs-var">exprsSomeFreeVarsList</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalId"><span class="hs-identifier hs-var">isLocalId</span></a></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span class="hs-comment">-- | Find all locally-defined free Ids or type variables in several expressions</span><span>
</span><span id="line-150"></span><span class="hs-comment">-- returning a non-deterministic set.</span><span>
</span><span id="line-151"></span><span class="annot"><a href="GHC.Core.FVs.html#exprsFreeVars"><span class="hs-identifier hs-type">exprsFreeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-152"></span><span id="exprsFreeVars"><span class="annot"><span class="annottext">exprsFreeVars :: [CoreExpr] -&gt; VarSet
</span><a href="GHC.Core.FVs.html#exprsFreeVars"><span class="hs-identifier hs-var hs-var">exprsFreeVars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; ([CoreExpr] -&gt; FV) -&gt; [CoreExpr] -&gt; VarSet
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr] -&gt; FV
</span><a href="GHC.Core.FVs.html#exprsFVs"><span class="hs-identifier hs-var">exprsFVs</span></a></span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span class="hs-comment">-- | Find all locally-defined free Ids or type variables in several expressions</span><span>
</span><span id="line-155"></span><span class="hs-comment">-- returning a composable FV computation. See Note [FV naming conventions] in &quot;GHC.Utils.FV&quot;</span><span>
</span><span id="line-156"></span><span class="hs-comment">-- for why export it.</span><span>
</span><span id="line-157"></span><span class="annot"><a href="GHC.Core.FVs.html#exprsFVs"><span class="hs-identifier hs-type">exprsFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-158"></span><span id="exprsFVs"><span class="annot"><span class="annottext">exprsFVs :: [CoreExpr] -&gt; FV
</span><a href="GHC.Core.FVs.html#exprsFVs"><span class="hs-identifier hs-var hs-var">exprsFVs</span></a></span></span><span> </span><span id="local-6989586621680852116"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680852116"><span class="hs-identifier hs-var">exprs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; FV) -&gt; [CoreExpr] -&gt; FV
forall a. (a -&gt; FV) -&gt; [a] -&gt; FV
</span><a href="GHC.Utils.FV.html#mapUnionFV"><span class="hs-identifier hs-var">mapUnionFV</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#exprFVs"><span class="hs-identifier hs-var">exprFVs</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680852116"><span class="hs-identifier hs-var">exprs</span></a></span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span class="hs-comment">-- | Find all locally-defined free Ids or type variables in several expressions</span><span>
</span><span id="line-161"></span><span class="hs-comment">-- returning a deterministically ordered list.</span><span>
</span><span id="line-162"></span><span class="annot"><a href="GHC.Core.FVs.html#exprsFreeVarsList"><span class="hs-identifier hs-type">exprsFreeVarsList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-163"></span><span id="exprsFreeVarsList"><span class="annot"><span class="annottext">exprsFreeVarsList :: [CoreExpr] -&gt; [Var]
</span><a href="GHC.Core.FVs.html#exprsFreeVarsList"><span class="hs-identifier hs-var hs-var">exprsFreeVarsList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; [Var]
</span><a href="GHC.Utils.FV.html#fvVarList"><span class="hs-identifier hs-var">fvVarList</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; [Var]) -&gt; ([CoreExpr] -&gt; FV) -&gt; [CoreExpr] -&gt; [Var]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr] -&gt; FV
</span><a href="GHC.Core.FVs.html#exprsFVs"><span class="hs-identifier hs-var">exprsFVs</span></a></span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span class="hs-comment">-- | Find all locally defined free Ids in a binding group</span><span>
</span><span id="line-166"></span><span class="annot"><a href="GHC.Core.FVs.html#bindFreeVars"><span class="hs-identifier hs-type">bindFreeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreBind"><span class="hs-identifier hs-type">CoreBind</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-167"></span><span id="bindFreeVars"><span class="annot"><span class="annottext">bindFreeVars :: CoreBind -&gt; VarSet
</span><a href="GHC.Core.FVs.html#bindFreeVars"><span class="hs-identifier hs-var hs-var">bindFreeVars</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-type">NonRec</span></a></span><span> </span><span id="local-6989586621680852113"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852113"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621680852112"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852112"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; FV -&gt; VarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalVar"><span class="hs-identifier hs-var">isLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Var, CoreExpr) -&gt; FV
</span><a href="GHC.Core.FVs.html#rhs_fvs"><span class="hs-identifier hs-var">rhs_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852113"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852112"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span class="annot"><a href="GHC.Core.FVs.html#bindFreeVars"><span class="hs-identifier hs-var">bindFreeVars</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-type">Rec</span></a></span><span> </span><span id="local-6989586621680852109"><span class="annot"><span class="annottext">[(Var, CoreExpr)]
</span><a href="#local-6989586621680852109"><span class="hs-identifier hs-var">prs</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; FV -&gt; VarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalVar"><span class="hs-identifier hs-var">isLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-169"></span><span>                                </span><span class="annot"><span class="annottext">[Var] -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndrs"><span class="hs-identifier hs-var">addBndrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Var, CoreExpr) -&gt; Var) -&gt; [(Var, CoreExpr)] -&gt; [Var]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Var, CoreExpr) -&gt; Var
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">[(Var, CoreExpr)]
</span><a href="#local-6989586621680852109"><span class="hs-identifier hs-var">prs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-170"></span><span>                                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Var, CoreExpr) -&gt; FV) -&gt; [(Var, CoreExpr)] -&gt; FV
forall a. (a -&gt; FV) -&gt; [a] -&gt; FV
</span><a href="GHC.Utils.FV.html#mapUnionFV"><span class="hs-identifier hs-var">mapUnionFV</span></a></span><span> </span><span class="annot"><span class="annottext">(Var, CoreExpr) -&gt; FV
</span><a href="GHC.Core.FVs.html#rhs_fvs"><span class="hs-identifier hs-var">rhs_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[(Var, CoreExpr)]
</span><a href="#local-6989586621680852109"><span class="hs-identifier hs-var">prs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span class="hs-comment">-- | Finds free variables in an expression selected by a predicate</span><span>
</span><span id="line-173"></span><span class="annot"><a href="GHC.Core.FVs.html#exprSomeFreeVars"><span class="hs-identifier hs-type">exprSomeFreeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#InterestingVarFun"><span class="hs-identifier hs-type">InterestingVarFun</span></a></span><span>   </span><span class="hs-comment">-- ^ Says which 'Var's are interesting</span><span>
</span><span id="line-174"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-175"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-176"></span><span id="exprSomeFreeVars"><span class="annot"><span class="annottext">exprSomeFreeVars :: InterestingVarFun -&gt; CoreExpr -&gt; VarSet
</span><a href="GHC.Core.FVs.html#exprSomeFreeVars"><span class="hs-identifier hs-var hs-var">exprSomeFreeVars</span></a></span></span><span> </span><span id="local-6989586621680852107"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852107"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852106"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852106"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; FV -&gt; VarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852107"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852106"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span class="hs-comment">-- | Finds free variables in an expression selected by a predicate</span><span>
</span><span id="line-179"></span><span class="hs-comment">-- returning a deterministically ordered list.</span><span>
</span><span id="line-180"></span><span class="annot"><a href="GHC.Core.FVs.html#exprSomeFreeVarsList"><span class="hs-identifier hs-type">exprSomeFreeVarsList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#InterestingVarFun"><span class="hs-identifier hs-type">InterestingVarFun</span></a></span><span> </span><span class="hs-comment">-- ^ Says which 'Var's are interesting</span><span>
</span><span id="line-181"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-182"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-183"></span><span id="exprSomeFreeVarsList"><span class="annot"><span class="annottext">exprSomeFreeVarsList :: InterestingVarFun -&gt; CoreExpr -&gt; [Var]
</span><a href="GHC.Core.FVs.html#exprSomeFreeVarsList"><span class="hs-identifier hs-var hs-var">exprSomeFreeVarsList</span></a></span></span><span> </span><span id="local-6989586621680852105"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852105"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852104"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852104"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; [Var]
</span><a href="GHC.Utils.FV.html#fvVarList"><span class="hs-identifier hs-var">fvVarList</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; [Var]) -&gt; FV -&gt; [Var]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852105"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852104"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span class="hs-comment">-- | Finds free variables in an expression selected by a predicate</span><span>
</span><span id="line-186"></span><span class="hs-comment">-- returning a deterministic set.</span><span>
</span><span id="line-187"></span><span class="annot"><a href="GHC.Core.FVs.html#exprSomeFreeVarsDSet"><span class="hs-identifier hs-type">exprSomeFreeVarsDSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#InterestingVarFun"><span class="hs-identifier hs-type">InterestingVarFun</span></a></span><span> </span><span class="hs-comment">-- ^ Says which 'Var's are interesting</span><span>
</span><span id="line-188"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-189"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>
</span><span id="line-190"></span><span id="exprSomeFreeVarsDSet"><span class="annot"><span class="annottext">exprSomeFreeVarsDSet :: InterestingVarFun -&gt; CoreExpr -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#exprSomeFreeVarsDSet"><span class="hs-identifier hs-var hs-var">exprSomeFreeVarsDSet</span></a></span></span><span> </span><span id="local-6989586621680852103"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852103"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852102"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852102"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; DVarSet
</span><a href="GHC.Utils.FV.html#fvDVarSet"><span class="hs-identifier hs-var">fvDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; DVarSet) -&gt; FV -&gt; DVarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852103"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852102"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-191"></span><span>
</span><span id="line-192"></span><span class="hs-comment">-- | Finds free variables in several expressions selected by a predicate</span><span>
</span><span id="line-193"></span><span class="annot"><a href="GHC.Core.FVs.html#exprsSomeFreeVars"><span class="hs-identifier hs-type">exprsSomeFreeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#InterestingVarFun"><span class="hs-identifier hs-type">InterestingVarFun</span></a></span><span>  </span><span class="hs-comment">-- Says which 'Var's are interesting</span><span>
</span><span id="line-194"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-195"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-196"></span><span id="exprsSomeFreeVars"><span class="annot"><span class="annottext">exprsSomeFreeVars :: InterestingVarFun -&gt; [CoreExpr] -&gt; VarSet
</span><a href="GHC.Core.FVs.html#exprsSomeFreeVars"><span class="hs-identifier hs-var hs-var">exprsSomeFreeVars</span></a></span></span><span> </span><span id="local-6989586621680852101"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852101"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852100"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680852100"><span class="hs-identifier hs-var">es</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-197"></span><span>  </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; FV -&gt; VarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852101"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; FV) -&gt; [CoreExpr] -&gt; FV
forall a. (a -&gt; FV) -&gt; [a] -&gt; FV
</span><a href="GHC.Utils.FV.html#mapUnionFV"><span class="hs-identifier hs-var">mapUnionFV</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680852100"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span class="hs-comment">-- | Finds free variables in several expressions selected by a predicate</span><span>
</span><span id="line-200"></span><span class="hs-comment">-- returning a deterministically ordered list.</span><span>
</span><span id="line-201"></span><span class="annot"><a href="GHC.Core.FVs.html#exprsSomeFreeVarsList"><span class="hs-identifier hs-type">exprsSomeFreeVarsList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#InterestingVarFun"><span class="hs-identifier hs-type">InterestingVarFun</span></a></span><span>  </span><span class="hs-comment">-- Says which 'Var's are interesting</span><span>
</span><span id="line-202"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-203"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-204"></span><span id="exprsSomeFreeVarsList"><span class="annot"><span class="annottext">exprsSomeFreeVarsList :: InterestingVarFun -&gt; [CoreExpr] -&gt; [Var]
</span><a href="GHC.Core.FVs.html#exprsSomeFreeVarsList"><span class="hs-identifier hs-var hs-var">exprsSomeFreeVarsList</span></a></span></span><span> </span><span id="local-6989586621680852099"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852099"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852098"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680852098"><span class="hs-identifier hs-var">es</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-205"></span><span>  </span><span class="annot"><span class="annottext">FV -&gt; [Var]
</span><a href="GHC.Utils.FV.html#fvVarList"><span class="hs-identifier hs-var">fvVarList</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; [Var]) -&gt; FV -&gt; [Var]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852099"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; FV) -&gt; [CoreExpr] -&gt; FV
forall a. (a -&gt; FV) -&gt; [a] -&gt; FV
</span><a href="GHC.Utils.FV.html#mapUnionFV"><span class="hs-identifier hs-var">mapUnionFV</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680852098"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span class="hs-comment">-- | Finds free variables in several expressions selected by a predicate</span><span>
</span><span id="line-208"></span><span class="hs-comment">-- returning a deterministic set.</span><span>
</span><span id="line-209"></span><span class="annot"><a href="GHC.Core.FVs.html#exprsSomeFreeVarsDSet"><span class="hs-identifier hs-type">exprsSomeFreeVarsDSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#InterestingVarFun"><span class="hs-identifier hs-type">InterestingVarFun</span></a></span><span> </span><span class="hs-comment">-- ^ Says which 'Var's are interesting</span><span>
</span><span id="line-210"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-211"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>
</span><span id="line-212"></span><span id="exprsSomeFreeVarsDSet"><span class="annot"><span class="annottext">exprsSomeFreeVarsDSet :: InterestingVarFun -&gt; [CoreExpr] -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#exprsSomeFreeVarsDSet"><span class="hs-identifier hs-var hs-var">exprsSomeFreeVarsDSet</span></a></span></span><span> </span><span id="local-6989586621680852097"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852097"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852096"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680852096"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-213"></span><span>  </span><span class="annot"><span class="annottext">FV -&gt; DVarSet
</span><a href="GHC.Utils.FV.html#fvDVarSet"><span class="hs-identifier hs-var">fvDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; DVarSet) -&gt; FV -&gt; DVarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852097"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; FV) -&gt; [CoreExpr] -&gt; FV
forall a. (a -&gt; FV) -&gt; [a] -&gt; FV
</span><a href="GHC.Utils.FV.html#mapUnionFV"><span class="hs-identifier hs-var">mapUnionFV</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680852096"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-214"></span><span>
</span><span id="line-215"></span><span class="hs-comment">--      Comment about obsolete code</span><span>
</span><span id="line-216"></span><span class="hs-comment">-- We used to gather the free variables the RULES at a variable occurrence</span><span>
</span><span id="line-217"></span><span class="hs-comment">-- with the following cryptic comment:</span><span>
</span><span id="line-218"></span><span class="hs-comment">--     &quot;At a variable occurrence, add in any free variables of its rule rhss</span><span>
</span><span id="line-219"></span><span class="hs-comment">--     Curiously, we gather the Id's free *type* variables from its binding</span><span>
</span><span id="line-220"></span><span class="hs-comment">--     site, but its free *rule-rhs* variables from its usage sites.  This</span><span>
</span><span id="line-221"></span><span class="hs-comment">--     is a little weird.  The reason is that the former is more efficient,</span><span>
</span><span id="line-222"></span><span class="hs-comment">--     but the latter is more fine grained, and a makes a difference when</span><span>
</span><span id="line-223"></span><span class="hs-comment">--     a variable mentions itself one of its own rule RHSs&quot;</span><span>
</span><span id="line-224"></span><span class="hs-comment">-- Not only is this &quot;weird&quot;, but it's also pretty bad because it can make</span><span>
</span><span id="line-225"></span><span class="hs-comment">-- a function seem more recursive than it is.  Suppose</span><span>
</span><span id="line-226"></span><span class="hs-comment">--      f  = ...g...</span><span>
</span><span id="line-227"></span><span class="hs-comment">--      g  = ...</span><span>
</span><span id="line-228"></span><span class="hs-comment">--         RULE g x = ...f...</span><span>
</span><span id="line-229"></span><span class="hs-comment">-- Then f is not mentioned in its own RHS, and needn't be a loop breaker</span><span>
</span><span id="line-230"></span><span class="hs-comment">-- (though g may be).  But if we collect the rule fvs from g's occurrence,</span><span>
</span><span id="line-231"></span><span class="hs-comment">-- it looks as if f mentions itself.  (This bites in the eftInt/eftIntFB</span><span>
</span><span id="line-232"></span><span class="hs-comment">-- code in GHC.Enum.)</span><span>
</span><span id="line-233"></span><span class="hs-comment">--</span><span>
</span><span id="line-234"></span><span class="hs-comment">-- Anyway, it seems plain wrong.  The RULE is like an extra RHS for the</span><span>
</span><span id="line-235"></span><span class="hs-comment">-- function, so its free variables belong at the definition site.</span><span>
</span><span id="line-236"></span><span class="hs-comment">--</span><span>
</span><span id="line-237"></span><span class="hs-comment">-- Deleted code looked like</span><span>
</span><span id="line-238"></span><span class="hs-comment">--     foldVarSet add_rule_var var_itself_set (idRuleVars var)</span><span>
</span><span id="line-239"></span><span class="hs-comment">--     add_rule_var var set | keep_it fv_cand in_scope var = extendVarSet set var</span><span>
</span><span id="line-240"></span><span class="hs-comment">--                          | otherwise                    = set</span><span>
</span><span id="line-241"></span><span class="hs-comment">--      SLPJ Feb06</span><span>
</span><span id="line-242"></span><span>
</span><span id="line-243"></span><span class="annot"><a href="GHC.Core.FVs.html#addBndr"><span class="hs-identifier hs-type">addBndr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreBndr"><span class="hs-identifier hs-type">CoreBndr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-244"></span><span id="addBndr"><span class="annot"><span class="annottext">addBndr :: Var -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndr"><span class="hs-identifier hs-var hs-var">addBndr</span></a></span></span><span> </span><span id="local-6989586621680852093"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852093"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span id="local-6989586621680852092"><span class="annot"><span class="annottext">FV
</span><a href="#local-6989586621680852092"><span class="hs-identifier hs-var">fv</span></a></span></span><span> </span><span id="local-6989586621680852091"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852091"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852090"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852090"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680852089"><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852089"><span class="hs-identifier hs-var">acc</span></a></span></span><span>
</span><span id="line-245"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#varTypeTyCoFVs"><span class="hs-identifier hs-var">varTypeTyCoFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852093"><span class="hs-identifier hs-var">bndr</span></a></span><span> </span><span class="annot"><span class="annottext">FV -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#unionFV"><span class="hs-operator hs-var">`unionFV`</span></a></span><span>
</span><span id="line-246"></span><span>        </span><span class="hs-comment">-- Include type variables in the binder's type</span><span>
</span><span id="line-247"></span><span>        </span><span class="hs-comment">--      (not just Ids; coercion variables too!)</span><span>
</span><span id="line-248"></span><span>     </span><span class="annot"><span class="annottext">Var -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#delFV"><span class="hs-identifier hs-var">FV.delFV</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852093"><span class="hs-identifier hs-var">bndr</span></a></span><span> </span><span class="annot"><span class="annottext">FV
</span><a href="#local-6989586621680852092"><span class="hs-identifier hs-var">fv</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852091"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852090"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852089"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-249"></span><span>
</span><span id="line-250"></span><span class="annot"><a href="GHC.Core.FVs.html#addBndrs"><span class="hs-identifier hs-type">addBndrs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreBndr"><span class="hs-identifier hs-type">CoreBndr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-251"></span><span id="addBndrs"><span class="annot"><span class="annottext">addBndrs :: [Var] -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndrs"><span class="hs-identifier hs-var hs-var">addBndrs</span></a></span></span><span> </span><span id="local-6989586621680852086"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680852086"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span> </span><span id="local-6989586621680852085"><span class="annot"><span class="annottext">FV
</span><a href="#local-6989586621680852085"><span class="hs-identifier hs-var">fv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Var -&gt; FV -&gt; FV) -&gt; FV -&gt; [Var] -&gt; FV
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndr"><span class="hs-identifier hs-var">addBndr</span></a></span><span> </span><span class="annot"><span class="annottext">FV
</span><a href="#local-6989586621680852085"><span class="hs-identifier hs-var">fv</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680852086"><span class="hs-identifier hs-var">bndrs</span></a></span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span class="annot"><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-type">expr_fvs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-254"></span><span id="expr_fvs"><span class="annot"><span class="annottext">expr_fvs :: CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var hs-var">expr_fvs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span id="local-6989586621680852082"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680852082"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852081"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852081"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852080"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852080"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680852079"><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852079"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-255"></span><span>  </span><span class="annot"><span class="annottext">Type -&gt; FV
</span><a href="GHC.Core.TyCo.FVs.html#tyCoFVsOfType"><span class="hs-identifier hs-var">tyCoFVsOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680852082"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852081"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852080"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852079"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-256"></span><span class="annot"><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span> </span><span id="local-6989586621680852076"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680852076"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852075"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852075"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852074"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852074"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680852073"><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852073"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-257"></span><span>  </span><span class="annot"><span class="annottext">Coercion -&gt; FV
</span><a href="GHC.Core.TyCo.FVs.html#tyCoFVsOfCo"><span class="hs-identifier hs-var">tyCoFVsOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680852076"><span class="hs-identifier hs-var">co</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852075"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852074"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852073"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-258"></span><span class="annot"><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span id="local-6989586621680852070"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852070"><span class="hs-identifier hs-var">var</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852069"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852069"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852068"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852068"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680852067"><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852067"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Utils.FV.html#unitFV"><span class="hs-identifier hs-var">FV.unitFV</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852070"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852069"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852068"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852067"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-259"></span><span class="annot"><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Lit"><span class="hs-identifier hs-type">Lit</span></a></span><span> </span><span class="annot"><span class="annottext">Literal
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852064"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852064"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852063"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852063"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680852062"><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852062"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV
</span><a href="GHC.Utils.FV.html#emptyFV"><span class="hs-identifier hs-var">emptyFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852064"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852063"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852062"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-260"></span><span class="annot"><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span id="local-6989586621680852059"><span class="annot"><span class="annottext">Tickish Var
</span><a href="#local-6989586621680852059"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621680852058"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852058"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852057"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852057"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852056"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852056"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680852055"><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852055"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-261"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Tickish Var -&gt; FV
</span><a href="GHC.Core.FVs.html#tickish_fvs"><span class="hs-identifier hs-var">tickish_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish Var
</span><a href="#local-6989586621680852059"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">FV -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#unionFV"><span class="hs-operator hs-var">`unionFV`</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852058"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852057"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852056"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852055"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-262"></span><span class="annot"><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#App"><span class="hs-identifier hs-type">App</span></a></span><span> </span><span id="local-6989586621680852052"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852052"><span class="hs-identifier hs-var">fun</span></a></span></span><span> </span><span id="local-6989586621680852051"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852051"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852050"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852050"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852049"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852049"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680852048"><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852048"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-263"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852052"><span class="hs-identifier hs-var">fun</span></a></span><span> </span><span class="annot"><span class="annottext">FV -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#unionFV"><span class="hs-operator hs-var">`unionFV`</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852051"><span class="hs-identifier hs-var">arg</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852050"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852049"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852048"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-264"></span><span class="annot"><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Lam"><span class="hs-identifier hs-type">Lam</span></a></span><span> </span><span id="local-6989586621680852046"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852046"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span id="local-6989586621680852045"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852045"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852044"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852044"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852043"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852043"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680852042"><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852042"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-265"></span><span>  </span><span class="annot"><span class="annottext">Var -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndr"><span class="hs-identifier hs-var">addBndr</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852046"><span class="hs-identifier hs-var">bndr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852045"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852044"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852043"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852042"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-266"></span><span class="annot"><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Cast"><span class="hs-identifier hs-type">Cast</span></a></span><span> </span><span id="local-6989586621680852040"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852040"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621680852039"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680852039"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852038"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852038"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852037"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852037"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680852036"><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852036"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-267"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852040"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="annot"><span class="annottext">FV -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#unionFV"><span class="hs-operator hs-var">`unionFV`</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; FV
</span><a href="GHC.Core.TyCo.FVs.html#tyCoFVsOfCo"><span class="hs-identifier hs-var">tyCoFVsOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680852039"><span class="hs-identifier hs-var">co</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852038"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852037"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852036"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-268"></span><span>
</span><span id="line-269"></span><span class="annot"><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Case"><span class="hs-identifier hs-type">Case</span></a></span><span> </span><span id="local-6989586621680852034"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852034"><span class="hs-identifier hs-var">scrut</span></a></span></span><span> </span><span id="local-6989586621680852033"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852033"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span id="local-6989586621680852032"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680852032"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680852031"><span class="annot"><span class="annottext">[Alt Var]
</span><a href="#local-6989586621680852031"><span class="hs-identifier hs-var">alts</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852030"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852030"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852029"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852029"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680852028"><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852028"><span class="hs-identifier hs-var">acc</span></a></span></span><span>
</span><span id="line-270"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852034"><span class="hs-identifier hs-var">scrut</span></a></span><span> </span><span class="annot"><span class="annottext">FV -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#unionFV"><span class="hs-operator hs-var">`unionFV`</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; FV
</span><a href="GHC.Core.TyCo.FVs.html#tyCoFVsOfType"><span class="hs-identifier hs-var">tyCoFVsOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680852032"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">FV -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#unionFV"><span class="hs-operator hs-var">`unionFV`</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndr"><span class="hs-identifier hs-var">addBndr</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852033"><span class="hs-identifier hs-var">bndr</span></a></span><span>
</span><span id="line-271"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Alt Var -&gt; FV) -&gt; [Alt Var] -&gt; FV
forall a. (a -&gt; FV) -&gt; [a] -&gt; FV
</span><a href="GHC.Utils.FV.html#mapUnionFV"><span class="hs-identifier hs-var">mapUnionFV</span></a></span><span> </span><span class="annot"><span class="annottext">Alt Var -&gt; FV
forall {a}. (a, [Var], CoreExpr) -&gt; FV
</span><a href="#local-6989586621680852027"><span class="hs-identifier hs-var">alt_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[Alt Var]
</span><a href="#local-6989586621680852031"><span class="hs-identifier hs-var">alts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852030"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852029"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852028"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-272"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-273"></span><span>    </span><span id="local-6989586621680852027"><span class="annot"><span class="annottext">alt_fvs :: (a, [Var], CoreExpr) -&gt; FV
</span><a href="#local-6989586621680852027"><span class="hs-identifier hs-var hs-var">alt_fvs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680852026"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680852026"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680852025"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852025"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndrs"><span class="hs-identifier hs-var">addBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680852026"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852025"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-274"></span><span>
</span><span id="line-275"></span><span class="annot"><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Let"><span class="hs-identifier hs-type">Let</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-type">NonRec</span></a></span><span> </span><span id="local-6989586621680852023"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852023"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span id="local-6989586621680852022"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852022"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852021"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852021"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852020"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852020"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852019"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852019"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680852018"><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852018"><span class="hs-identifier hs-var">acc</span></a></span></span><span>
</span><span id="line-276"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Var, CoreExpr) -&gt; FV
</span><a href="GHC.Core.FVs.html#rhs_fvs"><span class="hs-identifier hs-var">rhs_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852023"><span class="hs-identifier hs-var">bndr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852022"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FV -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#unionFV"><span class="hs-operator hs-var">`unionFV`</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndr"><span class="hs-identifier hs-var">addBndr</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852023"><span class="hs-identifier hs-var">bndr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852021"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-277"></span><span>      </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852020"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852019"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852018"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-278"></span><span>
</span><span id="line-279"></span><span class="annot"><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Let"><span class="hs-identifier hs-type">Let</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-type">Rec</span></a></span><span> </span><span id="local-6989586621680852017"><span class="annot"><span class="annottext">[(Var, CoreExpr)]
</span><a href="#local-6989586621680852017"><span class="hs-identifier hs-var">pairs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852016"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852016"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680852015"><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852015"><span class="hs-identifier hs-var">fv_cand</span></a></span></span><span> </span><span id="local-6989586621680852014"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852014"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680852013"><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852013"><span class="hs-identifier hs-var">acc</span></a></span></span><span>
</span><span id="line-280"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndrs"><span class="hs-identifier hs-var">addBndrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Var, CoreExpr) -&gt; Var) -&gt; [(Var, CoreExpr)] -&gt; [Var]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Var, CoreExpr) -&gt; Var
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">[(Var, CoreExpr)]
</span><a href="#local-6989586621680852017"><span class="hs-identifier hs-var">pairs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-281"></span><span>             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Var, CoreExpr) -&gt; FV) -&gt; [(Var, CoreExpr)] -&gt; FV
forall a. (a -&gt; FV) -&gt; [a] -&gt; FV
</span><a href="GHC.Utils.FV.html#mapUnionFV"><span class="hs-identifier hs-var">mapUnionFV</span></a></span><span> </span><span class="annot"><span class="annottext">(Var, CoreExpr) -&gt; FV
</span><a href="GHC.Core.FVs.html#rhs_fvs"><span class="hs-identifier hs-var">rhs_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[(Var, CoreExpr)]
</span><a href="#local-6989586621680852017"><span class="hs-identifier hs-var">pairs</span></a></span><span> </span><span class="annot"><span class="annottext">FV -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#unionFV"><span class="hs-operator hs-var">`unionFV`</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852016"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-282"></span><span>               </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="#local-6989586621680852015"><span class="hs-identifier hs-var">fv_cand</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680852014"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarAcc
</span><a href="#local-6989586621680852013"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-283"></span><span>
</span><span id="line-284"></span><span class="hs-comment">---------</span><span>
</span><span id="line-285"></span><span class="annot"><a href="GHC.Core.FVs.html#rhs_fvs"><span class="hs-identifier hs-type">rhs_fvs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-286"></span><span id="rhs_fvs"><span class="annot"><span class="annottext">rhs_fvs :: (Var, CoreExpr) -&gt; FV
</span><a href="GHC.Core.FVs.html#rhs_fvs"><span class="hs-identifier hs-var hs-var">rhs_fvs</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680852012"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852012"><span class="hs-identifier hs-var">bndr</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680852011"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852011"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852011"><span class="hs-identifier hs-var">rhs</span></a></span><span> </span><span class="annot"><span class="annottext">FV -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#unionFV"><span class="hs-operator hs-var">`unionFV`</span></a></span><span>
</span><span id="line-287"></span><span>                      </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#bndrRuleAndUnfoldingFVs"><span class="hs-identifier hs-var">bndrRuleAndUnfoldingFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852012"><span class="hs-identifier hs-var">bndr</span></a></span><span>
</span><span id="line-288"></span><span>        </span><span class="hs-comment">-- Treat any RULES as extra RHSs of the binding</span><span>
</span><span id="line-289"></span><span>
</span><span id="line-290"></span><span class="hs-comment">---------</span><span>
</span><span id="line-291"></span><span class="annot"><a href="GHC.Core.FVs.html#exprs_fvs"><span class="hs-identifier hs-type">exprs_fvs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-292"></span><span id="exprs_fvs"><span class="annot"><span class="annottext">exprs_fvs :: [CoreExpr] -&gt; FV
</span><a href="GHC.Core.FVs.html#exprs_fvs"><span class="hs-identifier hs-var hs-var">exprs_fvs</span></a></span></span><span> </span><span id="local-6989586621680852008"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680852008"><span class="hs-identifier hs-var">exprs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; FV) -&gt; [CoreExpr] -&gt; FV
forall a. (a -&gt; FV) -&gt; [a] -&gt; FV
</span><a href="GHC.Utils.FV.html#mapUnionFV"><span class="hs-identifier hs-var">mapUnionFV</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680852008"><span class="hs-identifier hs-var">exprs</span></a></span><span>
</span><span id="line-293"></span><span>
</span><span id="line-294"></span><span class="annot"><a href="GHC.Core.FVs.html#tickish_fvs"><span class="hs-identifier hs-type">tickish_fvs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#Tickish"><span class="hs-identifier hs-type">Tickish</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-295"></span><span id="tickish_fvs"><span class="annot"><span class="annottext">tickish_fvs :: Tickish Var -&gt; FV
</span><a href="GHC.Core.FVs.html#tickish_fvs"><span class="hs-identifier hs-var hs-var">tickish_fvs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Breakpoint"><span class="hs-identifier hs-type">Breakpoint</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680852006"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680852006"><span class="hs-identifier hs-var">ids</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; FV
</span><a href="GHC.Utils.FV.html#mkFVs"><span class="hs-identifier hs-var">FV.mkFVs</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680852006"><span class="hs-identifier hs-var">ids</span></a></span><span>
</span><span id="line-296"></span><span class="annot"><a href="GHC.Core.FVs.html#tickish_fvs"><span class="hs-identifier hs-var">tickish_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish Var
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV
</span><a href="GHC.Utils.FV.html#emptyFV"><span class="hs-identifier hs-var">emptyFV</span></a></span><span>
</span><span id="line-297"></span><span>
</span><span id="line-298"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\section{Free names}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-305"></span><span>
</span><span id="line-306"></span><span class="hs-comment">-- | Finds the free /external/ names of an expression, notably</span><span>
</span><span id="line-307"></span><span class="hs-comment">-- including the names of type constructors (which of course do not show</span><span>
</span><span id="line-308"></span><span class="hs-comment">-- up in 'exprFreeVars').</span><span>
</span><span id="line-309"></span><span class="annot"><a href="GHC.Core.FVs.html#exprOrphNames"><span class="hs-identifier hs-type">exprOrphNames</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-310"></span><span class="hs-comment">-- There's no need to delete local binders, because they will all</span><span>
</span><span id="line-311"></span><span class="hs-comment">-- be /internal/ names.</span><span>
</span><span id="line-312"></span><span id="exprOrphNames"><span class="annot"><span class="annottext">exprOrphNames :: CoreExpr -&gt; NameSet
</span><a href="GHC.Core.FVs.html#exprOrphNames"><span class="hs-identifier hs-var hs-var">exprOrphNames</span></a></span></span><span> </span><span id="local-6989586621680852003"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852003"><span class="hs-identifier hs-var">e</span></a></span></span><span>
</span><span id="line-313"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; NameSet
</span><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680852003"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-314"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-315"></span><span>    </span><span id="local-6989586621680852002"><span class="annot"><span class="annottext">go :: CoreExpr -&gt; NameSet
</span><a href="#local-6989586621680852002"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span id="local-6989586621680852001"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852001"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-316"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isExternalName"><span class="hs-identifier hs-var">isExternalName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680851999"><span class="hs-identifier hs-var">n</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unitNameSet"><span class="hs-identifier hs-var">unitNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680851999"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-317"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-318"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680851999"><span class="annot"><span class="annottext">n :: Name
</span><a href="#local-6989586621680851999"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680852001"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-319"></span><span>    </span><span class="annot"><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Lit"><span class="hs-identifier hs-type">Lit</span></a></span><span> </span><span class="annot"><span class="annottext">Literal
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-320"></span><span>    </span><span class="annot"><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span id="local-6989586621680851995"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851995"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851995"><span class="hs-identifier hs-var">ty</span></a></span><span>        </span><span class="hs-comment">-- Don't need free tyvars</span><span>
</span><span id="line-321"></span><span>    </span><span class="annot"><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span> </span><span id="local-6989586621680851994"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851994"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851994"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-322"></span><span>    </span><span class="annot"><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#App"><span class="hs-identifier hs-type">App</span></a></span><span> </span><span id="local-6989586621680851993"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851993"><span class="hs-identifier hs-var">e1</span></a></span></span><span> </span><span id="local-6989586621680851992"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851992"><span class="hs-identifier hs-var">e2</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; NameSet
</span><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851993"><span class="hs-identifier hs-var">e1</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; NameSet
</span><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851992"><span class="hs-identifier hs-var">e2</span></a></span><span>
</span><span id="line-323"></span><span>    </span><span class="annot"><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Lam"><span class="hs-identifier hs-type">Lam</span></a></span><span> </span><span id="local-6989586621680851990"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851990"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621680851989"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851989"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; NameSet
</span><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851989"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; Name -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#delFromNameSet"><span class="hs-operator hs-var">`delFromNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851990"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-324"></span><span>    </span><span class="annot"><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish Var
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851987"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851987"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; NameSet
</span><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851987"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-325"></span><span>    </span><span class="annot"><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Cast"><span class="hs-identifier hs-type">Cast</span></a></span><span> </span><span id="local-6989586621680851986"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851986"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621680851985"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851985"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; NameSet
</span><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851986"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851985"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-326"></span><span>    </span><span class="annot"><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Let"><span class="hs-identifier hs-type">Let</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-type">NonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851984"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851984"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680851983"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851983"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; NameSet
</span><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851983"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; NameSet
</span><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851984"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-327"></span><span>    </span><span class="annot"><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Let"><span class="hs-identifier hs-type">Let</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-type">Rec</span></a></span><span> </span><span id="local-6989586621680851982"><span class="annot"><span class="annottext">[(Var, CoreExpr)]
</span><a href="#local-6989586621680851982"><span class="hs-identifier hs-var">prs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680851981"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851981"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[CoreExpr] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#exprsOrphNames"><span class="hs-identifier hs-var">exprsOrphNames</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Var, CoreExpr) -&gt; CoreExpr) -&gt; [(Var, CoreExpr)] -&gt; [CoreExpr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Var, CoreExpr) -&gt; CoreExpr
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">[(Var, CoreExpr)]
</span><a href="#local-6989586621680851982"><span class="hs-identifier hs-var">prs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; NameSet
</span><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851981"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-328"></span><span>    </span><span class="annot"><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Case"><span class="hs-identifier hs-type">Case</span></a></span><span> </span><span id="local-6989586621680851980"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851980"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="annot"><span class="annottext">Var
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851979"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851979"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680851978"><span class="annot"><span class="annottext">[Alt Var]
</span><a href="#local-6989586621680851978"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; NameSet
</span><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851980"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851979"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-329"></span><span>                              </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">[NameSet] -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSets"><span class="hs-identifier hs-var">unionNameSets</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Alt Var -&gt; NameSet) -&gt; [Alt Var] -&gt; [NameSet]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Alt Var -&gt; NameSet
</span><a href="#local-6989586621680851976"><span class="hs-identifier hs-var">go_alt</span></a></span><span> </span><span class="annot"><span class="annottext">[Alt Var]
</span><a href="#local-6989586621680851978"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-330"></span><span>
</span><span id="line-331"></span><span>    </span><span id="local-6989586621680851976"><span class="annot"><span class="annottext">go_alt :: Alt Var -&gt; NameSet
</span><a href="#local-6989586621680851976"><span class="hs-identifier hs-var hs-var">go_alt</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">AltCon
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[Var]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621680851975"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851975"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; NameSet
</span><a href="#local-6989586621680852002"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851975"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-332"></span><span>
</span><span id="line-333"></span><span class="hs-comment">-- | Finds the free /external/ names of several expressions: see 'exprOrphNames' for details</span><span>
</span><span id="line-334"></span><span class="annot"><a href="GHC.Core.FVs.html#exprsOrphNames"><span class="hs-identifier hs-type">exprsOrphNames</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-335"></span><span id="exprsOrphNames"><span class="annot"><span class="annottext">exprsOrphNames :: [CoreExpr] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#exprsOrphNames"><span class="hs-identifier hs-var hs-var">exprsOrphNames</span></a></span></span><span> </span><span id="local-6989586621680851974"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680851974"><span class="hs-identifier hs-var">es</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; NameSet -&gt; NameSet)
-&gt; NameSet -&gt; [CoreExpr] -&gt; NameSet
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-identifier hs-var">unionNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">(NameSet -&gt; NameSet -&gt; NameSet)
-&gt; (CoreExpr -&gt; NameSet) -&gt; CoreExpr -&gt; NameSet -&gt; NameSet
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; NameSet
</span><a href="GHC.Core.FVs.html#exprOrphNames"><span class="hs-identifier hs-var">exprOrphNames</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680851974"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-336"></span><span>
</span><span id="line-337"></span><span>
</span><span id="line-338"></span><span class="hs-comment">{- **********************************************************************
%*                                                                      *
                    orphNamesXXX

%*                                                                      *
%********************************************************************* -}</span><span>
</span><span id="line-344"></span><span>
</span><span id="line-345"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfTyCon"><span class="hs-identifier hs-type">orphNamesOfTyCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-346"></span><span id="orphNamesOfTyCon"><span class="annot"><span class="annottext">orphNamesOfTyCon :: TyCon -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfTyCon"><span class="hs-identifier hs-var hs-var">orphNamesOfTyCon</span></a></span></span><span> </span><span id="local-6989586621680851972"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680851972"><span class="hs-identifier hs-var">tycon</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unitNameSet"><span class="hs-identifier hs-var">unitNameSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680851972"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe Class
</span><a href="GHC.Core.TyCon.html#tyConClass_maybe"><span class="hs-identifier hs-var">tyConClass_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680851972"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-347"></span><span>    </span><span class="annot"><span class="annottext">Maybe Class
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-348"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680851969"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680851969"><span class="hs-identifier hs-var">cls</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unitNameSet"><span class="hs-identifier hs-var">unitNameSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680851969"><span class="hs-identifier hs-var">cls</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-349"></span><span>
</span><span id="line-350"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-type">orphNamesOfType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-351"></span><span id="orphNamesOfType"><span class="annot"><span class="annottext">orphNamesOfType :: Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var hs-var">orphNamesOfType</span></a></span></span><span> </span><span id="local-6989586621680851968"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851968"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680851967"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851967"><span class="hs-identifier hs-var">ty'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Maybe Type
</span><a href="GHC.Core.Type.html#coreView"><span class="hs-identifier hs-var">coreView</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851968"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851967"><span class="hs-identifier hs-var">ty'</span></a></span><span>
</span><span id="line-352"></span><span>                </span><span class="hs-comment">-- Look through type synonyms (#4912)</span><span>
</span><span id="line-353"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyVarTy"><span class="hs-identifier hs-type">TyVarTy</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-354"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#LitTy"><span class="hs-identifier hs-type">LitTy</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-355"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyConApp"><span class="hs-identifier hs-type">TyConApp</span></a></span><span> </span><span id="local-6989586621680851962"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680851962"><span class="hs-identifier hs-var">tycon</span></a></span></span><span> </span><span id="local-6989586621680851961"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680851961"><span class="hs-identifier hs-var">tys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680851960"><span class="hs-identifier hs-var">func</span></a></span><span>
</span><span id="line-356"></span><span>                                       </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfTyCon"><span class="hs-identifier hs-var">orphNamesOfTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680851962"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-357"></span><span>                                       </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfTypes"><span class="hs-identifier hs-var">orphNamesOfTypes</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680851961"><span class="hs-identifier hs-var">tys</span></a></span><span>
</span><span id="line-358"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680851960"><span class="annot"><span class="annottext">func :: NameSet
</span><a href="#local-6989586621680851960"><span class="hs-identifier hs-var hs-var">func</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680851961"><span class="hs-identifier hs-var">tys</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-359"></span><span>                       </span><span id="local-6989586621680851957"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851957"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[Type]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680851962"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; TyCon -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="GHC.Builtin.Types.Prim.html#funTyCon"><span class="hs-identifier hs-var">funTyCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orph_names_of_fun_ty_con"><span class="hs-identifier hs-var">orph_names_of_fun_ty_con</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851957"><span class="hs-identifier hs-var">arg</span></a></span><span>
</span><span id="line-360"></span><span>                       </span><span class="annot"><span class="annottext">[Type]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-361"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ForAllTy"><span class="hs-identifier hs-type">ForAllTy</span></a></span><span> </span><span id="local-6989586621680851953"><span class="annot"><span class="annottext">TyCoVarBinder
</span><a href="#local-6989586621680851953"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span id="local-6989586621680851952"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851952"><span class="hs-identifier hs-var">res</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCoVarBinder -&gt; Type
forall argf. VarBndr Var argf -&gt; Type
</span><a href="GHC.Types.Var.html#binderType"><span class="hs-identifier hs-var">binderType</span></a></span><span> </span><span class="annot"><span class="annottext">TyCoVarBinder
</span><a href="#local-6989586621680851953"><span class="hs-identifier hs-var">bndr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-362"></span><span>                                       </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851952"><span class="hs-identifier hs-var">res</span></a></span><span>
</span><span id="line-363"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#FunTy"><span class="hs-identifier hs-type">FunTy</span></a></span><span> </span><span class="annot"><span class="annottext">AnonArgFlag
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851949"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851949"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680851948"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851948"><span class="hs-identifier hs-var">arg</span></a></span></span><span> </span><span id="local-6989586621680851947"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851947"><span class="hs-identifier hs-var">res</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orph_names_of_fun_ty_con"><span class="hs-identifier hs-var">orph_names_of_fun_ty_con</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851949"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-364"></span><span>                                       </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unitNameSet"><span class="hs-identifier hs-var">unitNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Types.Prim.html#funTyConName"><span class="hs-identifier hs-var">funTyConName</span></a></span><span>
</span><span id="line-365"></span><span>                                       </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851949"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-366"></span><span>                                       </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851948"><span class="hs-identifier hs-var">arg</span></a></span><span>
</span><span id="line-367"></span><span>                                       </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851947"><span class="hs-identifier hs-var">res</span></a></span><span>
</span><span id="line-368"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#AppTy"><span class="hs-identifier hs-type">AppTy</span></a></span><span> </span><span id="local-6989586621680851945"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851945"><span class="hs-identifier hs-var">fun</span></a></span></span><span> </span><span id="local-6989586621680851944"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851944"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851945"><span class="hs-identifier hs-var">fun</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851944"><span class="hs-identifier hs-var">arg</span></a></span><span>
</span><span id="line-369"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#CastTy"><span class="hs-identifier hs-type">CastTy</span></a></span><span> </span><span id="local-6989586621680851942"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851942"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680851941"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851941"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851942"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851941"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-370"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#CoercionTy"><span class="hs-identifier hs-type">CoercionTy</span></a></span><span> </span><span id="local-6989586621680851939"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851939"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851939"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-371"></span><span>
</span><span id="line-372"></span><span id="local-6989586621680852253"><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfThings"><span class="hs-identifier hs-type">orphNamesOfThings</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680852253"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680852253"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span></span><span>
</span><span id="line-373"></span><span id="orphNamesOfThings"><span class="annot"><span class="annottext">orphNamesOfThings :: forall a. (a -&gt; NameSet) -&gt; [a] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfThings"><span class="hs-identifier hs-var hs-var">orphNamesOfThings</span></a></span></span><span> </span><span id="local-6989586621680851936"><span class="annot"><span class="annottext">a -&gt; NameSet
</span><a href="#local-6989586621680851936"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; NameSet -&gt; NameSet) -&gt; NameSet -&gt; [a] -&gt; NameSet
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-identifier hs-var">unionNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">(NameSet -&gt; NameSet -&gt; NameSet)
-&gt; (a -&gt; NameSet) -&gt; a -&gt; NameSet -&gt; NameSet
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; NameSet
</span><a href="#local-6989586621680851936"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-374"></span><span>
</span><span id="line-375"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfTypes"><span class="hs-identifier hs-type">orphNamesOfTypes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-376"></span><span id="orphNamesOfTypes"><span class="annot"><span class="annottext">orphNamesOfTypes :: [Type] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfTypes"><span class="hs-identifier hs-var hs-var">orphNamesOfTypes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; NameSet) -&gt; [Type] -&gt; NameSet
forall a. (a -&gt; NameSet) -&gt; [a] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfThings"><span class="hs-identifier hs-var">orphNamesOfThings</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span>
</span><span id="line-377"></span><span>
</span><span id="line-378"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfMCo"><span class="hs-identifier hs-type">orphNamesOfMCo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#MCoercion"><span class="hs-identifier hs-type">MCoercion</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-379"></span><span id="orphNamesOfMCo"><span class="annot"><span class="annottext">orphNamesOfMCo :: MCoercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfMCo"><span class="hs-identifier hs-var hs-var">orphNamesOfMCo</span></a></span></span><span> </span><span class="annot"><span class="annottext">MCoercion
</span><a href="GHC.Core.TyCo.Rep.html#MRefl"><span class="hs-identifier hs-var">MRefl</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-380"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfMCo"><span class="hs-identifier hs-var">orphNamesOfMCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#MCo"><span class="hs-identifier hs-type">MCo</span></a></span><span> </span><span id="local-6989586621680851932"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851932"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851932"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-381"></span><span>
</span><span id="line-382"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-type">orphNamesOfCo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-383"></span><span id="orphNamesOfCo"><span class="annot"><span class="annottext">orphNamesOfCo :: Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var hs-var">orphNamesOfCo</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Refl"><span class="hs-identifier hs-type">Refl</span></a></span><span> </span><span id="local-6989586621680851930"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851930"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851930"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-384"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#GRefl"><span class="hs-identifier hs-type">GRefl</span></a></span><span> </span><span class="annot"><span class="annottext">Role
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851928"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851928"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680851927"><span class="annot"><span class="annottext">MCoercion
</span><a href="#local-6989586621680851927"><span class="hs-identifier hs-var">mco</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851928"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">MCoercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfMCo"><span class="hs-identifier hs-var">orphNamesOfMCo</span></a></span><span> </span><span class="annot"><span class="annottext">MCoercion
</span><a href="#local-6989586621680851927"><span class="hs-identifier hs-var">mco</span></a></span><span>
</span><span id="line-385"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyConAppCo"><span class="hs-identifier hs-type">TyConAppCo</span></a></span><span> </span><span class="annot"><span class="annottext">Role
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851925"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680851925"><span class="hs-identifier hs-var">tc</span></a></span></span><span> </span><span id="local-6989586621680851924"><span class="annot"><span class="annottext">[Coercion]
</span><a href="#local-6989586621680851924"><span class="hs-identifier hs-var">cos</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unitNameSet"><span class="hs-identifier hs-var">unitNameSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680851925"><span class="hs-identifier hs-var">tc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">[Coercion] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCos"><span class="hs-identifier hs-var">orphNamesOfCos</span></a></span><span> </span><span class="annot"><span class="annottext">[Coercion]
</span><a href="#local-6989586621680851924"><span class="hs-identifier hs-var">cos</span></a></span><span>
</span><span id="line-386"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#AppCo"><span class="hs-identifier hs-type">AppCo</span></a></span><span> </span><span id="local-6989586621680851921"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851921"><span class="hs-identifier hs-var">co1</span></a></span></span><span> </span><span id="local-6989586621680851920"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851920"><span class="hs-identifier hs-var">co2</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851921"><span class="hs-identifier hs-var">co1</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851920"><span class="hs-identifier hs-var">co2</span></a></span><span>
</span><span id="line-387"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ForAllCo"><span class="hs-identifier hs-type">ForAllCo</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851918"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851918"><span class="hs-identifier hs-var">kind_co</span></a></span></span><span> </span><span id="local-6989586621680851917"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851917"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-388"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851918"><span class="hs-identifier hs-var">kind_co</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851917"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-389"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#FunCo"><span class="hs-identifier hs-type">FunCo</span></a></span><span> </span><span class="annot"><span class="annottext">Role
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851915"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851915"><span class="hs-identifier hs-var">co_mult</span></a></span></span><span> </span><span id="local-6989586621680851914"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851914"><span class="hs-identifier hs-var">co1</span></a></span></span><span> </span><span id="local-6989586621680851913"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851913"><span class="hs-identifier hs-var">co2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851915"><span class="hs-identifier hs-var">co_mult</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851914"><span class="hs-identifier hs-var">co1</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851913"><span class="hs-identifier hs-var">co2</span></a></span><span>
</span><span id="line-390"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#CoVarCo"><span class="hs-identifier hs-type">CoVarCo</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-391"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#AxiomInstCo"><span class="hs-identifier hs-type">AxiomInstCo</span></a></span><span> </span><span id="local-6989586621680851910"><span class="annot"><span class="annottext">CoAxiom Branched
</span><a href="#local-6989586621680851910"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851909"><span class="annot"><span class="annottext">[Coercion]
</span><a href="#local-6989586621680851909"><span class="hs-identifier hs-var">cos</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoAxiom Branched -&gt; NameSet
forall (br :: BranchFlag). CoAxiom br -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCoCon"><span class="hs-identifier hs-var">orphNamesOfCoCon</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom Branched
</span><a href="#local-6989586621680851910"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">[Coercion] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCos"><span class="hs-identifier hs-var">orphNamesOfCos</span></a></span><span> </span><span class="annot"><span class="annottext">[Coercion]
</span><a href="#local-6989586621680851909"><span class="hs-identifier hs-var">cos</span></a></span><span>
</span><span id="line-392"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#UnivCo"><span class="hs-identifier hs-type">UnivCo</span></a></span><span> </span><span id="local-6989586621680851907"><span class="annot"><span class="annottext">UnivCoProvenance
</span><a href="#local-6989586621680851907"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><span class="annottext">Role
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851906"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851906"><span class="hs-identifier hs-var">t1</span></a></span></span><span> </span><span id="local-6989586621680851905"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851905"><span class="hs-identifier hs-var">t2</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnivCoProvenance -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfProv"><span class="hs-identifier hs-var">orphNamesOfProv</span></a></span><span> </span><span class="annot"><span class="annottext">UnivCoProvenance
</span><a href="#local-6989586621680851907"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851906"><span class="hs-identifier hs-var">t1</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851905"><span class="hs-identifier hs-var">t2</span></a></span><span>
</span><span id="line-393"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#SymCo"><span class="hs-identifier hs-type">SymCo</span></a></span><span> </span><span id="local-6989586621680851902"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851902"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851902"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-394"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TransCo"><span class="hs-identifier hs-type">TransCo</span></a></span><span> </span><span id="local-6989586621680851900"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851900"><span class="hs-identifier hs-var">co1</span></a></span></span><span> </span><span id="local-6989586621680851899"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851899"><span class="hs-identifier hs-var">co2</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851900"><span class="hs-identifier hs-var">co1</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851899"><span class="hs-identifier hs-var">co2</span></a></span><span>
</span><span id="line-395"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#NthCo"><span class="hs-identifier hs-type">NthCo</span></a></span><span> </span><span class="annot"><span class="annottext">Role
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851897"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851897"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851897"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-396"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#LRCo"><span class="hs-identifier hs-type">LRCo</span></a></span><span>  </span><span class="annot"><span class="annottext">LeftOrRight
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851895"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851895"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851895"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-397"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#InstCo"><span class="hs-identifier hs-type">InstCo</span></a></span><span> </span><span id="local-6989586621680851893"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851893"><span class="hs-identifier hs-var">co</span></a></span></span><span> </span><span id="local-6989586621680851892"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851892"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851893"><span class="hs-identifier hs-var">co</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851892"><span class="hs-identifier hs-var">arg</span></a></span><span>
</span><span id="line-398"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#KindCo"><span class="hs-identifier hs-type">KindCo</span></a></span><span> </span><span id="local-6989586621680851890"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851890"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851890"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-399"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#SubCo"><span class="hs-identifier hs-type">SubCo</span></a></span><span> </span><span id="local-6989586621680851888"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851888"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851888"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-400"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#AxiomRuleCo"><span class="hs-identifier hs-type">AxiomRuleCo</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiomRule
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851886"><span class="annot"><span class="annottext">[Coercion]
</span><a href="#local-6989586621680851886"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Coercion] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCos"><span class="hs-identifier hs-var">orphNamesOfCos</span></a></span><span> </span><span class="annot"><span class="annottext">[Coercion]
</span><a href="#local-6989586621680851886"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-401"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#HoleCo"><span class="hs-identifier hs-type">HoleCo</span></a></span><span> </span><span class="annot"><span class="annottext">CoercionHole
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-402"></span><span>
</span><span id="line-403"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfProv"><span class="hs-identifier hs-type">orphNamesOfProv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#UnivCoProvenance"><span class="hs-identifier hs-type">UnivCoProvenance</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-404"></span><span id="orphNamesOfProv"><span class="annot"><span class="annottext">orphNamesOfProv :: UnivCoProvenance -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfProv"><span class="hs-identifier hs-var hs-var">orphNamesOfProv</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#PhantomProv"><span class="hs-identifier hs-type">PhantomProv</span></a></span><span> </span><span id="local-6989586621680851883"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851883"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851883"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-405"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfProv"><span class="hs-identifier hs-var">orphNamesOfProv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ProofIrrelProv"><span class="hs-identifier hs-type">ProofIrrelProv</span></a></span><span> </span><span id="local-6989586621680851881"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851881"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851881"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-406"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfProv"><span class="hs-identifier hs-var">orphNamesOfProv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#PluginProv"><span class="hs-identifier hs-type">PluginProv</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-407"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfProv"><span class="hs-identifier hs-var">orphNamesOfProv</span></a></span><span> </span><span class="annot"><span class="annottext">UnivCoProvenance
</span><a href="GHC.Core.TyCo.Rep.html#CorePrepProv"><span class="hs-identifier hs-var">CorePrepProv</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-408"></span><span>
</span><span id="line-409"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCos"><span class="hs-identifier hs-type">orphNamesOfCos</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-410"></span><span id="orphNamesOfCos"><span class="annot"><span class="annottext">orphNamesOfCos :: [Coercion] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCos"><span class="hs-identifier hs-var hs-var">orphNamesOfCos</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Coercion -&gt; NameSet) -&gt; [Coercion] -&gt; NameSet
forall a. (a -&gt; NameSet) -&gt; [a] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfThings"><span class="hs-identifier hs-var">orphNamesOfThings</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCo"><span class="hs-identifier hs-var">orphNamesOfCo</span></a></span><span>
</span><span id="line-411"></span><span>
</span><span id="line-412"></span><span id="local-6989586621680852246"><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCoCon"><span class="hs-identifier hs-type">orphNamesOfCoCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Coercion.Axiom.html#CoAxiom"><span class="hs-identifier hs-type">CoAxiom</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680852246"><span class="hs-identifier hs-type">br</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span></span><span>
</span><span id="line-413"></span><span id="orphNamesOfCoCon"><span class="annot"><span class="annottext">orphNamesOfCoCon :: forall (br :: BranchFlag). CoAxiom br -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCoCon"><span class="hs-identifier hs-var hs-var">orphNamesOfCoCon</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Coercion.Axiom.html#CoAxiom"><span class="hs-identifier hs-type">CoAxiom</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">co_ax_tc :: forall (br :: BranchFlag). CoAxiom br -&gt; TyCon
</span><a href="GHC.Core.Coercion.Axiom.html#co_ax_tc"><span class="hs-identifier hs-var">co_ax_tc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851876"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680851876"><span class="hs-identifier hs-var">tc</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">co_ax_branches :: forall (br :: BranchFlag). CoAxiom br -&gt; Branches br
</span><a href="GHC.Core.Coercion.Axiom.html#co_ax_branches"><span class="hs-identifier hs-var">co_ax_branches</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851874"><span class="annot"><span class="annottext">Branches br
</span><a href="#local-6989586621680851874"><span class="hs-identifier hs-var">branches</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-414"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfTyCon"><span class="hs-identifier hs-var">orphNamesOfTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680851876"><span class="hs-identifier hs-var">tc</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Branches br -&gt; NameSet
forall (br :: BranchFlag). Branches br -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCoAxBranches"><span class="hs-identifier hs-var">orphNamesOfCoAxBranches</span></a></span><span> </span><span class="annot"><span class="annottext">Branches br
</span><a href="#local-6989586621680851874"><span class="hs-identifier hs-var">branches</span></a></span><span>
</span><span id="line-415"></span><span>
</span><span id="line-416"></span><span id="local-6989586621680851872"><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfAxiom"><span class="hs-identifier hs-type">orphNamesOfAxiom</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Coercion.Axiom.html#CoAxiom"><span class="hs-identifier hs-type">CoAxiom</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680851872"><span class="hs-identifier hs-type">br</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span></span><span>
</span><span id="line-417"></span><span id="orphNamesOfAxiom"><span class="annot"><span class="annottext">orphNamesOfAxiom :: forall (br :: BranchFlag). CoAxiom br -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfAxiom"><span class="hs-identifier hs-var hs-var">orphNamesOfAxiom</span></a></span></span><span> </span><span id="local-6989586621680851869"><span class="annot"><span class="annottext">CoAxiom br
</span><a href="#local-6989586621680851869"><span class="hs-identifier hs-var">axiom</span></a></span></span><span>
</span><span id="line-418"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfTypes"><span class="hs-identifier hs-var">orphNamesOfTypes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CoAxBranch -&gt; [Type]) -&gt; [CoAxBranch] -&gt; [Type]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxBranch -&gt; [Type]
</span><a href="GHC.Core.Coercion.Axiom.html#coAxBranchLHS"><span class="hs-identifier hs-var">coAxBranchLHS</span></a></span><span> </span><span class="annot"><span class="annottext">([CoAxBranch] -&gt; [Type]) -&gt; [CoAxBranch] -&gt; [Type]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Branches br -&gt; [CoAxBranch]
forall (br :: BranchFlag). Branches br -&gt; [CoAxBranch]
</span><a href="GHC.Core.Coercion.Axiom.html#fromBranches"><span class="hs-identifier hs-var">fromBranches</span></a></span><span> </span><span class="annot"><span class="annottext">(Branches br -&gt; [CoAxBranch]) -&gt; Branches br -&gt; [CoAxBranch]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom br -&gt; Branches br
forall (br :: BranchFlag). CoAxiom br -&gt; Branches br
</span><a href="GHC.Core.Coercion.Axiom.html#coAxiomBranches"><span class="hs-identifier hs-var">coAxiomBranches</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom br
</span><a href="#local-6989586621680851869"><span class="hs-identifier hs-var">axiom</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-419"></span><span>    </span><span class="annot"><span class="annottext">NameSet -&gt; Name -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#extendNameSet"><span class="hs-operator hs-var">`extendNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoAxiom br -&gt; TyCon
forall (br :: BranchFlag). CoAxiom br -&gt; TyCon
</span><a href="GHC.Core.Coercion.Axiom.html#coAxiomTyCon"><span class="hs-identifier hs-var">coAxiomTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom br
</span><a href="#local-6989586621680851869"><span class="hs-identifier hs-var">axiom</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-420"></span><span>
</span><span id="line-421"></span><span id="local-6989586621680852237"><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCoAxBranches"><span class="hs-identifier hs-type">orphNamesOfCoAxBranches</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Coercion.Axiom.html#Branches"><span class="hs-identifier hs-type">Branches</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680852237"><span class="hs-identifier hs-type">br</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span></span><span>
</span><span id="line-422"></span><span id="orphNamesOfCoAxBranches"><span class="annot"><span class="annottext">orphNamesOfCoAxBranches :: forall (br :: BranchFlag). Branches br -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCoAxBranches"><span class="hs-identifier hs-var hs-var">orphNamesOfCoAxBranches</span></a></span></span><span>
</span><span id="line-423"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoAxBranch -&gt; NameSet -&gt; NameSet)
-&gt; NameSet -&gt; [CoAxBranch] -&gt; NameSet
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-identifier hs-var">unionNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">(NameSet -&gt; NameSet -&gt; NameSet)
-&gt; (CoAxBranch -&gt; NameSet) -&gt; CoAxBranch -&gt; NameSet -&gt; NameSet
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxBranch -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCoAxBranch"><span class="hs-identifier hs-var">orphNamesOfCoAxBranch</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">([CoAxBranch] -&gt; NameSet)
-&gt; (Branches br -&gt; [CoAxBranch]) -&gt; Branches br -&gt; NameSet
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Branches br -&gt; [CoAxBranch]
forall (br :: BranchFlag). Branches br -&gt; [CoAxBranch]
</span><a href="GHC.Core.Coercion.Axiom.html#fromBranches"><span class="hs-identifier hs-var">fromBranches</span></a></span><span>
</span><span id="line-424"></span><span>
</span><span id="line-425"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfCoAxBranch"><span class="hs-identifier hs-type">orphNamesOfCoAxBranch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Coercion.Axiom.html#CoAxBranch"><span class="hs-identifier hs-type">CoAxBranch</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-426"></span><span id="orphNamesOfCoAxBranch"><span class="annot"><span class="annottext">orphNamesOfCoAxBranch :: CoAxBranch -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCoAxBranch"><span class="hs-identifier hs-var hs-var">orphNamesOfCoAxBranch</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Coercion.Axiom.html#CoAxBranch"><span class="hs-identifier hs-type">CoAxBranch</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cab_lhs :: CoAxBranch -&gt; [Type]
</span><a href="GHC.Core.Coercion.Axiom.html#cab_lhs"><span class="hs-identifier hs-var">cab_lhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851858"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680851858"><span class="hs-identifier hs-var">lhs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cab_rhs :: CoAxBranch -&gt; Type
</span><a href="GHC.Core.Coercion.Axiom.html#cab_rhs"><span class="hs-identifier hs-var">cab_rhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851856"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851856"><span class="hs-identifier hs-var">rhs</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-427"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfTypes"><span class="hs-identifier hs-var">orphNamesOfTypes</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680851858"><span class="hs-identifier hs-var">lhs</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unionNameSet"><span class="hs-operator hs-var">`unionNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfType"><span class="hs-identifier hs-var">orphNamesOfType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851856"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-428"></span><span>
</span><span id="line-429"></span><span class="hs-comment">-- | orphNamesOfAxiom collects the names of the concrete types and</span><span>
</span><span id="line-430"></span><span class="hs-comment">-- type constructors that make up the LHS of a type family instance,</span><span>
</span><span id="line-431"></span><span class="hs-comment">-- including the family name itself.</span><span>
</span><span id="line-432"></span><span class="hs-comment">--</span><span>
</span><span id="line-433"></span><span class="hs-comment">-- For instance, given `type family Foo a b`:</span><span>
</span><span id="line-434"></span><span class="hs-comment">-- `type instance Foo (F (G (H a))) b = ...` would yield [Foo,F,G,H]</span><span>
</span><span id="line-435"></span><span class="hs-comment">--</span><span>
</span><span id="line-436"></span><span class="hs-comment">-- Used in the implementation of &quot;:info&quot; in GHCi.</span><span>
</span><span id="line-437"></span><span class="annot"><a href="GHC.Core.FVs.html#orphNamesOfFamInst"><span class="hs-identifier hs-type">orphNamesOfFamInst</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInst"><span class="hs-identifier hs-type">FamInst</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-438"></span><span id="orphNamesOfFamInst"><span class="annot"><span class="annottext">orphNamesOfFamInst :: FamInst -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfFamInst"><span class="hs-identifier hs-var hs-var">orphNamesOfFamInst</span></a></span></span><span> </span><span id="local-6989586621680851855"><span class="annot"><span class="annottext">FamInst
</span><a href="#local-6989586621680851855"><span class="hs-identifier hs-var">fam_inst</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoAxiom Unbranched -&gt; NameSet
forall (br :: BranchFlag). CoAxiom br -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfAxiom"><span class="hs-identifier hs-var">orphNamesOfAxiom</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FamInst -&gt; CoAxiom Unbranched
</span><a href="GHC.Core.FamInstEnv.html#famInstAxiom"><span class="hs-identifier hs-var">famInstAxiom</span></a></span><span> </span><span class="annot"><span class="annottext">FamInst
</span><a href="#local-6989586621680851855"><span class="hs-identifier hs-var">fam_inst</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-439"></span><span>
</span><span id="line-440"></span><span class="hs-comment">-- Detect FUN 'Many as an application of (-&gt;), so that :i (-&gt;) works as expected</span><span>
</span><span id="line-441"></span><span class="hs-comment">-- (see #8535) Issue #16475 describes a more robust solution</span><span>
</span><span id="line-442"></span><span class="annot"><a href="GHC.Core.FVs.html#orph_names_of_fun_ty_con"><span class="hs-identifier hs-type">orph_names_of_fun_ty_con</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-443"></span><span id="orph_names_of_fun_ty_con"><span class="annot"><span class="annottext">orph_names_of_fun_ty_con :: Type -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orph_names_of_fun_ty_con"><span class="hs-identifier hs-var hs-var">orph_names_of_fun_ty_con</span></a></span></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#unitNameSet"><span class="hs-identifier hs-var">unitNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Types.html#unrestrictedFunTyConName"><span class="hs-identifier hs-var">unrestrictedFunTyConName</span></a></span><span>
</span><span id="line-444"></span><span class="annot"><a href="GHC.Core.FVs.html#orph_names_of_fun_ty_con"><span class="hs-identifier hs-var">orph_names_of_fun_ty_con</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-445"></span><span>
</span><span id="line-446"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\section[freevars-everywhere]{Attaching free variables to every sub-expression}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-453"></span><span>
</span><span id="line-454"></span><span class="hs-comment">-- | Those variables free in the right hand side of a rule returned as a</span><span>
</span><span id="line-455"></span><span class="hs-comment">-- non-deterministic set</span><span>
</span><span id="line-456"></span><span class="annot"><a href="GHC.Core.FVs.html#ruleRhsFreeVars"><span class="hs-identifier hs-type">ruleRhsFreeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-457"></span><span id="ruleRhsFreeVars"><span class="annot"><span class="annottext">ruleRhsFreeVars :: CoreRule -&gt; VarSet
</span><a href="GHC.Core.FVs.html#ruleRhsFreeVars"><span class="hs-identifier hs-var hs-var">ruleRhsFreeVars</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#BuiltinRule"><span class="hs-identifier hs-type">BuiltinRule</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="GHC.Core.FVs.html#noFVs"><span class="hs-identifier hs-var">noFVs</span></a></span><span>
</span><span id="line-458"></span><span class="annot"><a href="GHC.Core.FVs.html#ruleRhsFreeVars"><span class="hs-identifier hs-var">ruleRhsFreeVars</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rule"><span class="hs-identifier hs-type">Rule</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ru_fn :: CoreRule -&gt; Name
</span><a href="GHC.Core.html#ru_fn"><span class="hs-identifier hs-var">ru_fn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_bndrs :: CoreRule -&gt; [Var]
</span><a href="GHC.Core.html#ru_bndrs"><span class="hs-identifier hs-var">ru_bndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851846"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851846"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_rhs :: CoreRule -&gt; CoreExpr
</span><a href="GHC.Core.html#ru_rhs"><span class="hs-identifier hs-var">ru_rhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851844"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851844"><span class="hs-identifier hs-var">rhs</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-459"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; FV -&gt; VarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalVar"><span class="hs-identifier hs-var">isLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndrs"><span class="hs-identifier hs-var">addBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851846"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851844"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-460"></span><span>      </span><span class="hs-comment">-- See Note [Rule free var hack]</span><span>
</span><span id="line-461"></span><span>
</span><span id="line-462"></span><span class="hs-comment">-- | Those variables free in the both the left right hand sides of a rule</span><span>
</span><span id="line-463"></span><span class="hs-comment">-- returned as a non-deterministic set</span><span>
</span><span id="line-464"></span><span class="annot"><a href="GHC.Core.FVs.html#ruleFreeVars"><span class="hs-identifier hs-type">ruleFreeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-465"></span><span id="ruleFreeVars"><span class="annot"><span class="annottext">ruleFreeVars :: CoreRule -&gt; VarSet
</span><a href="GHC.Core.FVs.html#ruleFreeVars"><span class="hs-identifier hs-var hs-var">ruleFreeVars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; (CoreRule -&gt; FV) -&gt; CoreRule -&gt; VarSet
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoreRule -&gt; FV
</span><a href="GHC.Core.FVs.html#ruleFVs"><span class="hs-identifier hs-var">ruleFVs</span></a></span><span>
</span><span id="line-466"></span><span>
</span><span id="line-467"></span><span class="hs-comment">-- | Those variables free in the both the left right hand sides of a rule</span><span>
</span><span id="line-468"></span><span class="hs-comment">-- returned as FV computation</span><span>
</span><span id="line-469"></span><span class="annot"><a href="GHC.Core.FVs.html#ruleFVs"><span class="hs-identifier hs-type">ruleFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-470"></span><span id="ruleFVs"><span class="annot"><span class="annottext">ruleFVs :: CoreRule -&gt; FV
</span><a href="GHC.Core.FVs.html#ruleFVs"><span class="hs-identifier hs-var hs-var">ruleFVs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#BuiltinRule"><span class="hs-identifier hs-type">BuiltinRule</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV
</span><a href="GHC.Utils.FV.html#emptyFV"><span class="hs-identifier hs-var">emptyFV</span></a></span><span>
</span><span id="line-471"></span><span class="annot"><a href="GHC.Core.FVs.html#ruleFVs"><span class="hs-identifier hs-var">ruleFVs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rule"><span class="hs-identifier hs-type">Rule</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ru_fn :: CoreRule -&gt; Name
</span><a href="GHC.Core.html#ru_fn"><span class="hs-identifier hs-var">ru_fn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851842"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680851842"><span class="hs-identifier hs-var">_do_not_include</span></a></span></span><span>
</span><span id="line-472"></span><span>                  </span><span class="hs-comment">-- See Note [Rule free var hack]</span><span>
</span><span id="line-473"></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_bndrs :: CoreRule -&gt; [Var]
</span><a href="GHC.Core.html#ru_bndrs"><span class="hs-identifier hs-var">ru_bndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851841"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851841"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span>
</span><span id="line-474"></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_rhs :: CoreRule -&gt; CoreExpr
</span><a href="GHC.Core.html#ru_rhs"><span class="hs-identifier hs-var">ru_rhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851840"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851840"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_args :: CoreRule -&gt; [CoreExpr]
</span><a href="GHC.Core.html#ru_args"><span class="hs-identifier hs-var">ru_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851838"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680851838"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-475"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalVar"><span class="hs-identifier hs-var">isLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndrs"><span class="hs-identifier hs-var">addBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851841"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[CoreExpr] -&gt; FV
</span><a href="GHC.Core.FVs.html#exprs_fvs"><span class="hs-identifier hs-var">exprs_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851840"><span class="hs-identifier hs-var">rhs</span></a></span><span class="annot"><span class="annottext">CoreExpr -&gt; [CoreExpr] -&gt; [CoreExpr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680851838"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-476"></span><span>
</span><span id="line-477"></span><span class="hs-comment">-- | Those variables free in the both the left right hand sides of rules</span><span>
</span><span id="line-478"></span><span class="hs-comment">-- returned as FV computation</span><span>
</span><span id="line-479"></span><span class="annot"><a href="GHC.Core.FVs.html#rulesFVs"><span class="hs-identifier hs-type">rulesFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-480"></span><span id="rulesFVs"><span class="annot"><span class="annottext">rulesFVs :: [CoreRule] -&gt; FV
</span><a href="GHC.Core.FVs.html#rulesFVs"><span class="hs-identifier hs-var hs-var">rulesFVs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreRule -&gt; FV) -&gt; [CoreRule] -&gt; FV
forall a. (a -&gt; FV) -&gt; [a] -&gt; FV
</span><a href="GHC.Utils.FV.html#mapUnionFV"><span class="hs-identifier hs-var">mapUnionFV</span></a></span><span> </span><span class="annot"><span class="annottext">CoreRule -&gt; FV
</span><a href="GHC.Core.FVs.html#ruleFVs"><span class="hs-identifier hs-var">ruleFVs</span></a></span><span>
</span><span id="line-481"></span><span>
</span><span id="line-482"></span><span class="hs-comment">-- | Those variables free in the both the left right hand sides of rules</span><span>
</span><span id="line-483"></span><span class="hs-comment">-- returned as a deterministic set</span><span>
</span><span id="line-484"></span><span class="annot"><a href="GHC.Core.FVs.html#rulesFreeVarsDSet"><span class="hs-identifier hs-type">rulesFreeVarsDSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>
</span><span id="line-485"></span><span id="rulesFreeVarsDSet"><span class="annot"><span class="annottext">rulesFreeVarsDSet :: [CoreRule] -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#rulesFreeVarsDSet"><span class="hs-identifier hs-var hs-var">rulesFreeVarsDSet</span></a></span></span><span> </span><span id="local-6989586621680851836"><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621680851836"><span class="hs-identifier hs-var">rules</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; DVarSet
</span><a href="GHC.Utils.FV.html#fvDVarSet"><span class="hs-identifier hs-var">fvDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; DVarSet) -&gt; FV -&gt; DVarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreRule] -&gt; FV
</span><a href="GHC.Core.FVs.html#rulesFVs"><span class="hs-identifier hs-var">rulesFVs</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621680851836"><span class="hs-identifier hs-var">rules</span></a></span><span>
</span><span id="line-486"></span><span>
</span><span id="line-487"></span><span class="hs-comment">-- | Make a 'RuleInfo' containing a number of 'CoreRule's, suitable</span><span>
</span><span id="line-488"></span><span class="hs-comment">-- for putting into an 'IdInfo'</span><span>
</span><span id="line-489"></span><span class="annot"><a href="GHC.Core.FVs.html#mkRuleInfo"><span class="hs-identifier hs-type">mkRuleInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#RuleInfo"><span class="hs-identifier hs-type">RuleInfo</span></a></span><span>
</span><span id="line-490"></span><span id="mkRuleInfo"><span class="annot"><span class="annottext">mkRuleInfo :: [CoreRule] -&gt; RuleInfo
</span><a href="GHC.Core.FVs.html#mkRuleInfo"><span class="hs-identifier hs-var hs-var">mkRuleInfo</span></a></span></span><span> </span><span id="local-6989586621680851835"><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621680851835"><span class="hs-identifier hs-var">rules</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[CoreRule] -&gt; DVarSet -&gt; RuleInfo
</span><a href="GHC.Types.Id.Info.html#RuleInfo"><span class="hs-identifier hs-var">RuleInfo</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621680851835"><span class="hs-identifier hs-var">rules</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[CoreRule] -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#rulesFreeVarsDSet"><span class="hs-identifier hs-var">rulesFreeVarsDSet</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621680851835"><span class="hs-identifier hs-var">rules</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-491"></span><span>
</span><span id="line-492"></span><span class="annot"><a href="GHC.Core.FVs.html#idRuleRhsVars"><span class="hs-identifier hs-type">idRuleRhsVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#Activation"><span class="hs-identifier hs-type">Activation</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-493"></span><span class="hs-comment">-- Just the variables free on the *rhs* of a rule</span><span>
</span><span id="line-494"></span><span id="idRuleRhsVars"><span class="annot"><span class="annottext">idRuleRhsVars :: (Activation -&gt; Bool) -&gt; Var -&gt; VarSet
</span><a href="GHC.Core.FVs.html#idRuleRhsVars"><span class="hs-identifier hs-var hs-var">idRuleRhsVars</span></a></span></span><span> </span><span id="local-6989586621680851833"><span class="annot"><span class="annottext">Activation -&gt; Bool
</span><a href="#local-6989586621680851833"><span class="hs-identifier hs-var">is_active</span></a></span></span><span> </span><span id="local-6989586621680851832"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851832"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-495"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreRule -&gt; VarSet) -&gt; [CoreRule] -&gt; VarSet
forall a. (a -&gt; VarSet) -&gt; [a] -&gt; VarSet
</span><a href="GHC.Types.Var.Set.html#mapUnionVarSet"><span class="hs-identifier hs-var">mapUnionVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">CoreRule -&gt; VarSet
</span><a href="#local-6989586621680851830"><span class="hs-identifier hs-var">get_fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; [CoreRule]
</span><a href="GHC.Types.Id.html#idCoreRules"><span class="hs-identifier hs-var">idCoreRules</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851832"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-496"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-497"></span><span>    </span><span id="local-6989586621680851830"><span class="annot"><span class="annottext">get_fvs :: CoreRule -&gt; VarSet
</span><a href="#local-6989586621680851830"><span class="hs-identifier hs-var hs-var">get_fvs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rule"><span class="hs-identifier hs-type">Rule</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ru_fn :: CoreRule -&gt; Name
</span><a href="GHC.Core.html#ru_fn"><span class="hs-identifier hs-var">ru_fn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851826"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680851826"><span class="hs-identifier hs-var">fn</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_bndrs :: CoreRule -&gt; [Var]
</span><a href="GHC.Core.html#ru_bndrs"><span class="hs-identifier hs-var">ru_bndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851825"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851825"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span>
</span><span id="line-498"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_rhs :: CoreRule -&gt; CoreExpr
</span><a href="GHC.Core.html#ru_rhs"><span class="hs-identifier hs-var">ru_rhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851824"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851824"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_act :: CoreRule -&gt; Activation
</span><a href="GHC.Core.html#ru_act"><span class="hs-identifier hs-var">ru_act</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851822"><span class="annot"><span class="annottext">Activation
</span><a href="#local-6989586621680851822"><span class="hs-identifier hs-var">act</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-499"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Activation -&gt; Bool
</span><a href="#local-6989586621680851833"><span class="hs-identifier hs-var">is_active</span></a></span><span> </span><span class="annot"><span class="annottext">Activation
</span><a href="#local-6989586621680851822"><span class="hs-identifier hs-var">act</span></a></span><span>
</span><span id="line-500"></span><span>            </span><span class="hs-comment">-- See Note [Finding rule RHS free vars] in &quot;GHC.Core.Opt.OccurAnal&quot;</span><span>
</span><span id="line-501"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; Unique -&gt; VarSet
forall a. UniqSet a -&gt; Unique -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#delOneFromUniqSet_Directly"><span class="hs-identifier hs-var">delOneFromUniqSet_Directly</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680851820"><span class="hs-identifier hs-var">fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680851826"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-502"></span><span>            </span><span class="hs-comment">-- Note [Rule free var hack]</span><span>
</span><span id="line-503"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-504"></span><span>        </span><span id="local-6989586621680851820"><span class="annot"><span class="annottext">fvs :: VarSet
</span><a href="#local-6989586621680851820"><span class="hs-identifier hs-var hs-var">fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; FV -&gt; VarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalVar"><span class="hs-identifier hs-var">isLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndrs"><span class="hs-identifier hs-var">addBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851825"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851824"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-505"></span><span>    </span><span class="annot"><a href="#local-6989586621680851830"><span class="hs-identifier hs-var">get_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreRule
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="GHC.Core.FVs.html#noFVs"><span class="hs-identifier hs-var">noFVs</span></a></span><span>
</span><span id="line-506"></span><span>
</span><span id="line-507"></span><span class="hs-comment">-- | Those variables free in the right hand side of several rules</span><span>
</span><span id="line-508"></span><span class="annot"><a href="GHC.Core.FVs.html#rulesFreeVars"><span class="hs-identifier hs-type">rulesFreeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-509"></span><span id="rulesFreeVars"><span class="annot"><span class="annottext">rulesFreeVars :: [CoreRule] -&gt; VarSet
</span><a href="GHC.Core.FVs.html#rulesFreeVars"><span class="hs-identifier hs-var hs-var">rulesFreeVars</span></a></span></span><span> </span><span id="local-6989586621680851818"><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621680851818"><span class="hs-identifier hs-var">rules</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreRule -&gt; VarSet) -&gt; [CoreRule] -&gt; VarSet
forall a. (a -&gt; VarSet) -&gt; [a] -&gt; VarSet
</span><a href="GHC.Types.Var.Set.html#mapUnionVarSet"><span class="hs-identifier hs-var">mapUnionVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">CoreRule -&gt; VarSet
</span><a href="GHC.Core.FVs.html#ruleFreeVars"><span class="hs-identifier hs-var">ruleFreeVars</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621680851818"><span class="hs-identifier hs-var">rules</span></a></span><span>
</span><span id="line-510"></span><span>
</span><span id="line-511"></span><span class="annot"><a href="GHC.Core.FVs.html#ruleLhsFreeIds"><span class="hs-identifier hs-type">ruleLhsFreeIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-512"></span><span class="hs-comment">-- ^ This finds all locally-defined free Ids on the left hand side of a rule</span><span>
</span><span id="line-513"></span><span class="hs-comment">-- and returns them as a non-deterministic set</span><span>
</span><span id="line-514"></span><span id="ruleLhsFreeIds"><span class="annot"><span class="annottext">ruleLhsFreeIds :: CoreRule -&gt; VarSet
</span><a href="GHC.Core.FVs.html#ruleLhsFreeIds"><span class="hs-identifier hs-var hs-var">ruleLhsFreeIds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; (CoreRule -&gt; FV) -&gt; CoreRule -&gt; VarSet
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoreRule -&gt; FV
</span><a href="GHC.Core.FVs.html#ruleLhsFVIds"><span class="hs-identifier hs-var">ruleLhsFVIds</span></a></span><span>
</span><span id="line-515"></span><span>
</span><span id="line-516"></span><span class="annot"><a href="GHC.Core.FVs.html#ruleLhsFreeIdsList"><span class="hs-identifier hs-type">ruleLhsFreeIdsList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-517"></span><span class="hs-comment">-- ^ This finds all locally-defined free Ids on the left hand side of a rule</span><span>
</span><span id="line-518"></span><span class="hs-comment">-- and returns them as a deterministically ordered list</span><span>
</span><span id="line-519"></span><span id="ruleLhsFreeIdsList"><span class="annot"><span class="annottext">ruleLhsFreeIdsList :: CoreRule -&gt; [Var]
</span><a href="GHC.Core.FVs.html#ruleLhsFreeIdsList"><span class="hs-identifier hs-var hs-var">ruleLhsFreeIdsList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; [Var]
</span><a href="GHC.Utils.FV.html#fvVarList"><span class="hs-identifier hs-var">fvVarList</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; [Var]) -&gt; (CoreRule -&gt; FV) -&gt; CoreRule -&gt; [Var]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoreRule -&gt; FV
</span><a href="GHC.Core.FVs.html#ruleLhsFVIds"><span class="hs-identifier hs-var">ruleLhsFVIds</span></a></span><span>
</span><span id="line-520"></span><span>
</span><span id="line-521"></span><span class="annot"><a href="GHC.Core.FVs.html#ruleLhsFVIds"><span class="hs-identifier hs-type">ruleLhsFVIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-522"></span><span class="hs-comment">-- ^ This finds all locally-defined free Ids on the left hand side of a rule</span><span>
</span><span id="line-523"></span><span class="hs-comment">-- and returns an FV computation</span><span>
</span><span id="line-524"></span><span id="ruleLhsFVIds"><span class="annot"><span class="annottext">ruleLhsFVIds :: CoreRule -&gt; FV
</span><a href="GHC.Core.FVs.html#ruleLhsFVIds"><span class="hs-identifier hs-var hs-var">ruleLhsFVIds</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#BuiltinRule"><span class="hs-identifier hs-type">BuiltinRule</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV
</span><a href="GHC.Utils.FV.html#emptyFV"><span class="hs-identifier hs-var">emptyFV</span></a></span><span>
</span><span id="line-525"></span><span class="annot"><a href="GHC.Core.FVs.html#ruleLhsFVIds"><span class="hs-identifier hs-var">ruleLhsFVIds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rule"><span class="hs-identifier hs-type">Rule</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ru_bndrs :: CoreRule -&gt; [Var]
</span><a href="GHC.Core.html#ru_bndrs"><span class="hs-identifier hs-var">ru_bndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851816"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851816"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_args :: CoreRule -&gt; [CoreExpr]
</span><a href="GHC.Core.html#ru_args"><span class="hs-identifier hs-var">ru_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851815"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680851815"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-526"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalId"><span class="hs-identifier hs-var">isLocalId</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndrs"><span class="hs-identifier hs-var">addBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851816"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[CoreExpr] -&gt; FV
</span><a href="GHC.Core.FVs.html#exprs_fvs"><span class="hs-identifier hs-var">exprs_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680851815"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-527"></span><span>
</span><span id="line-528"></span><span class="annot"><a href="GHC.Core.FVs.html#ruleRhsFreeIds"><span class="hs-identifier hs-type">ruleRhsFreeIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-529"></span><span class="hs-comment">-- ^ This finds all locally-defined free Ids on the left hand side of a rule</span><span>
</span><span id="line-530"></span><span class="hs-comment">-- and returns them as a non-deterministic set</span><span>
</span><span id="line-531"></span><span id="ruleRhsFreeIds"><span class="annot"><span class="annottext">ruleRhsFreeIds :: CoreRule -&gt; VarSet
</span><a href="GHC.Core.FVs.html#ruleRhsFreeIds"><span class="hs-identifier hs-var hs-var">ruleRhsFreeIds</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#BuiltinRule"><span class="hs-identifier hs-type">BuiltinRule</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="GHC.Types.Var.Set.html#emptyVarSet"><span class="hs-identifier hs-var">emptyVarSet</span></a></span><span>
</span><span id="line-532"></span><span class="annot"><a href="GHC.Core.FVs.html#ruleRhsFreeIds"><span class="hs-identifier hs-var">ruleRhsFreeIds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rule"><span class="hs-identifier hs-type">Rule</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ru_bndrs :: CoreRule -&gt; [Var]
</span><a href="GHC.Core.html#ru_bndrs"><span class="hs-identifier hs-var">ru_bndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851813"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851813"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_args :: CoreRule -&gt; [CoreExpr]
</span><a href="GHC.Core.html#ru_args"><span class="hs-identifier hs-var">ru_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851812"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680851812"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-533"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; FV -&gt; VarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalId"><span class="hs-identifier hs-var">isLocalId</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-534"></span><span>     </span><span class="annot"><span class="annottext">[Var] -&gt; FV -&gt; FV
</span><a href="GHC.Core.FVs.html#addBndrs"><span class="hs-identifier hs-var">addBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851813"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr] -&gt; FV
</span><a href="GHC.Core.FVs.html#exprs_fvs"><span class="hs-identifier hs-var">exprs_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680851812"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-535"></span><span>
</span><span id="line-536"></span><span class="hs-comment">{-
Note [Rule free var hack]  (Not a hack any more)
~~~~~~~~~~~~~~~~~~~~~~~~~
We used not to include the Id in its own rhs free-var set.
Otherwise the occurrence analyser makes bindings recursive:
        f x y = x+y
        RULE:  f (f x y) z  ==&gt;  f x (f y z)
However, the occurrence analyser distinguishes &quot;non-rule loop breakers&quot;
from &quot;rule-only loop breakers&quot; (see BasicTypes.OccInfo).  So it will
put this 'f' in a Rec block, but will mark the binding as a non-rule loop
breaker, which is perfectly inlinable.
-}</span><span>
</span><span id="line-548"></span><span>
</span><span id="line-549"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\section[freevars-everywhere]{Attaching free variables to every sub-expression}
*                                                                      *
************************************************************************

The free variable pass annotates every node in the expression with its
NON-GLOBAL free variables and type variables.
-}</span><span>
</span><span id="line-559"></span><span>
</span><span id="line-560"></span><span class="hs-keyword">type</span><span> </span><span id="FVAnn"><span class="annot"><a href="GHC.Core.FVs.html#FVAnn"><span class="hs-identifier hs-var">FVAnn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>  </span><span class="hs-comment">-- See Note [The FVAnn invariant]</span><span>
</span><span id="line-561"></span><span>
</span><span id="line-562"></span><span class="hs-comment">{- Note [The FVAnn invariant]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Invariant: a FVAnn, say S, is closed:
  That is: if v is in S,
           then freevars( v's type/kind ) is also in S
-}</span><span>
</span><span id="line-568"></span><span>
</span><span id="line-569"></span><span class="hs-comment">-- | Every node in a binding group annotated with its</span><span>
</span><span id="line-570"></span><span class="hs-comment">-- (non-global) free variables, both Ids and TyVars, and type.</span><span>
</span><span id="line-571"></span><span class="hs-keyword">type</span><span> </span><span id="CoreBindWithFVs"><span class="annot"><a href="GHC.Core.FVs.html#CoreBindWithFVs"><span class="hs-identifier hs-var">CoreBindWithFVs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnBind"><span class="hs-identifier hs-type">AnnBind</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#FVAnn"><span class="hs-identifier hs-type">FVAnn</span></a></span><span>
</span><span id="line-572"></span><span>
</span><span id="line-573"></span><span class="hs-comment">-- | Every node in an expression annotated with its</span><span>
</span><span id="line-574"></span><span class="hs-comment">-- (non-global) free variables, both Ids and TyVars, and type.</span><span>
</span><span id="line-575"></span><span class="hs-comment">-- NB: see Note [The FVAnn invariant]</span><span>
</span><span id="line-576"></span><span class="hs-keyword">type</span><span> </span><span id="CoreExprWithFVs"><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs"><span class="hs-identifier hs-var">CoreExprWithFVs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnExpr"><span class="hs-identifier hs-type">AnnExpr</span></a></span><span>  </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#FVAnn"><span class="hs-identifier hs-type">FVAnn</span></a></span><span>
</span><span id="line-577"></span><span class="hs-keyword">type</span><span> </span><span id="CoreExprWithFVs%27"><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs%27"><span class="hs-identifier hs-var">CoreExprWithFVs'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnExpr%27"><span class="hs-identifier hs-type">AnnExpr'</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#FVAnn"><span class="hs-identifier hs-type">FVAnn</span></a></span><span>
</span><span id="line-578"></span><span>
</span><span id="line-579"></span><span class="hs-comment">-- | Every node in an expression annotated with its</span><span>
</span><span id="line-580"></span><span class="hs-comment">-- (non-global) free variables, both Ids and TyVars, and type.</span><span>
</span><span id="line-581"></span><span class="hs-keyword">type</span><span> </span><span id="CoreAltWithFVs"><span class="annot"><a href="GHC.Core.FVs.html#CoreAltWithFVs"><span class="hs-identifier hs-var">CoreAltWithFVs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnAlt"><span class="hs-identifier hs-type">AnnAlt</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#FVAnn"><span class="hs-identifier hs-type">FVAnn</span></a></span><span>
</span><span id="line-582"></span><span>
</span><span id="line-583"></span><span class="annot"><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-type">freeVarsOf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs"><span class="hs-identifier hs-type">CoreExprWithFVs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DIdSet"><span class="hs-identifier hs-type">DIdSet</span></a></span><span>
</span><span id="line-584"></span><span class="hs-comment">-- ^ Inverse function to 'freeVars'</span><span>
</span><span id="line-585"></span><span id="freeVarsOf"><span class="annot"><span class="annottext">freeVarsOf :: CoreExprWithFVs -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var hs-var">freeVarsOf</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680851811"><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851811"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">AnnExpr' Var DVarSet
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851811"><span class="hs-identifier hs-var">fvs</span></a></span><span>
</span><span id="line-586"></span><span>
</span><span id="line-587"></span><span class="hs-comment">-- | Extract the vars reported in a FVAnn</span><span>
</span><span id="line-588"></span><span class="annot"><a href="GHC.Core.FVs.html#freeVarsOfAnn"><span class="hs-identifier hs-type">freeVarsOfAnn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#FVAnn"><span class="hs-identifier hs-type">FVAnn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DIdSet"><span class="hs-identifier hs-type">DIdSet</span></a></span><span>
</span><span id="line-589"></span><span id="freeVarsOfAnn"><span class="annot"><span class="annottext">freeVarsOfAnn :: DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#freeVarsOfAnn"><span class="hs-identifier hs-var hs-var">freeVarsOfAnn</span></a></span></span><span> </span><span id="local-6989586621680851810"><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851810"><span class="hs-identifier hs-var">fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851810"><span class="hs-identifier hs-var">fvs</span></a></span><span>
</span><span id="line-590"></span><span>
</span><span id="line-591"></span><span class="annot"><a href="GHC.Core.FVs.html#noFVs"><span class="hs-identifier hs-type">noFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-592"></span><span id="noFVs"><span class="annot"><span class="annottext">noFVs :: VarSet
</span><a href="GHC.Core.FVs.html#noFVs"><span class="hs-identifier hs-var hs-var">noFVs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="GHC.Types.Var.Set.html#emptyVarSet"><span class="hs-identifier hs-var">emptyVarSet</span></a></span><span>
</span><span id="line-593"></span><span>
</span><span id="line-594"></span><span class="annot"><a href="GHC.Core.FVs.html#aFreeVar"><span class="hs-identifier hs-type">aFreeVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>
</span><span id="line-595"></span><span id="aFreeVar"><span class="annot"><span class="annottext">aFreeVar :: Var -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#aFreeVar"><span class="hs-identifier hs-var hs-var">aFreeVar</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; DVarSet
</span><a href="GHC.Types.Var.Set.html#unitDVarSet"><span class="hs-identifier hs-var">unitDVarSet</span></a></span><span>
</span><span id="line-596"></span><span>
</span><span id="line-597"></span><span class="annot"><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-identifier hs-type">unionFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>
</span><span id="line-598"></span><span id="unionFVs"><span class="annot"><span class="annottext">unionFVs :: DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-identifier hs-var hs-var">unionFVs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Types.Var.Set.html#unionDVarSet"><span class="hs-identifier hs-var">unionDVarSet</span></a></span><span>
</span><span id="line-599"></span><span>
</span><span id="line-600"></span><span class="annot"><a href="GHC.Core.FVs.html#unionFVss"><span class="hs-identifier hs-type">unionFVss</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>
</span><span id="line-601"></span><span id="unionFVss"><span class="annot"><span class="annottext">unionFVss :: [DVarSet] -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVss"><span class="hs-identifier hs-var hs-var">unionFVss</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[DVarSet] -&gt; DVarSet
</span><a href="GHC.Types.Var.Set.html#unionDVarSets"><span class="hs-identifier hs-var">unionDVarSets</span></a></span><span>
</span><span id="line-602"></span><span>
</span><span id="line-603"></span><span class="annot"><a href="GHC.Core.FVs.html#delBindersFV"><span class="hs-identifier hs-type">delBindersFV</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>
</span><span id="line-604"></span><span id="delBindersFV"><span class="annot"><span class="annottext">delBindersFV :: [Var] -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#delBindersFV"><span class="hs-identifier hs-var hs-var">delBindersFV</span></a></span></span><span> </span><span id="local-6989586621680851802"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851802"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span id="local-6989586621680851801"><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851801"><span class="hs-identifier hs-var">fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Var -&gt; DVarSet -&gt; DVarSet) -&gt; DVarSet -&gt; [Var] -&gt; DVarSet
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#delBinderFV"><span class="hs-identifier hs-var">delBinderFV</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851801"><span class="hs-identifier hs-var">fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851802"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-605"></span><span>
</span><span id="line-606"></span><span class="annot"><a href="GHC.Core.FVs.html#delBinderFV"><span class="hs-identifier hs-type">delBinderFV</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>
</span><span id="line-607"></span><span class="hs-comment">-- This way round, so we can do it multiple times using foldr</span><span>
</span><span id="line-608"></span><span>
</span><span id="line-609"></span><span class="hs-comment">-- (b `delBinderFV` s)</span><span>
</span><span id="line-610"></span><span class="hs-comment">--   * removes the binder b from the free variable set s,</span><span>
</span><span id="line-611"></span><span class="hs-comment">--   * AND *adds* to s the free variables of b's type</span><span>
</span><span id="line-612"></span><span class="hs-comment">--</span><span>
</span><span id="line-613"></span><span class="hs-comment">-- This is really important for some lambdas:</span><span>
</span><span id="line-614"></span><span class="hs-comment">--      In (\x::a -&gt; x) the only mention of &quot;a&quot; is in the binder.</span><span>
</span><span id="line-615"></span><span class="hs-comment">--</span><span>
</span><span id="line-616"></span><span class="hs-comment">-- Also in</span><span>
</span><span id="line-617"></span><span class="hs-comment">--      let x::a = b in ...</span><span>
</span><span id="line-618"></span><span class="hs-comment">-- we should really note that &quot;a&quot; is free in this expression.</span><span>
</span><span id="line-619"></span><span class="hs-comment">-- It'll be pinned inside the /\a by the binding for b, but</span><span>
</span><span id="line-620"></span><span class="hs-comment">-- it seems cleaner to make sure that a is in the free-var set</span><span>
</span><span id="line-621"></span><span class="hs-comment">-- when it is mentioned.</span><span>
</span><span id="line-622"></span><span class="hs-comment">--</span><span>
</span><span id="line-623"></span><span class="hs-comment">-- This also shows up in recursive bindings.  Consider:</span><span>
</span><span id="line-624"></span><span class="hs-comment">--      /\a -&gt; letrec x::a = x in E</span><span>
</span><span id="line-625"></span><span class="hs-comment">-- Now, there are no explicit free type variables in the RHS of x,</span><span>
</span><span id="line-626"></span><span class="hs-comment">-- but nevertheless &quot;a&quot; is free in its definition.  So we add in</span><span>
</span><span id="line-627"></span><span class="hs-comment">-- the free tyvars of the types of the binders, and include these in the</span><span>
</span><span id="line-628"></span><span class="hs-comment">-- free vars of the group, attached to the top level of each RHS.</span><span>
</span><span id="line-629"></span><span class="hs-comment">--</span><span>
</span><span id="line-630"></span><span class="hs-comment">-- This actually happened in the defn of errorIO in IOBase.hs:</span><span>
</span><span id="line-631"></span><span class="hs-comment">--      errorIO (ST io) = case (errorIO# io) of</span><span>
</span><span id="line-632"></span><span class="hs-comment">--                          _ -&gt; bottom</span><span>
</span><span id="line-633"></span><span class="hs-comment">--                        where</span><span>
</span><span id="line-634"></span><span class="hs-comment">--                          bottom = bottom -- Never evaluated</span><span>
</span><span id="line-635"></span><span>
</span><span id="line-636"></span><span id="delBinderFV"><span class="annot"><span class="annottext">delBinderFV :: Var -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#delBinderFV"><span class="hs-identifier hs-var hs-var">delBinderFV</span></a></span></span><span> </span><span id="local-6989586621680851799"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851799"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621680851798"><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851798"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851798"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet -&gt; Var -&gt; DVarSet
</span><a href="GHC.Types.Var.Set.html#delDVarSet"><span class="hs-operator hs-var">`delDVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851799"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-operator hs-var">`unionFVs`</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#dVarTypeTyCoVars"><span class="hs-identifier hs-var">dVarTypeTyCoVars</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851799"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-637"></span><span>        </span><span class="hs-comment">-- Include coercion variables too!</span><span>
</span><span id="line-638"></span><span>
</span><span id="line-639"></span><span class="annot"><a href="GHC.Core.FVs.html#varTypeTyCoVars"><span class="hs-identifier hs-type">varTypeTyCoVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#TyCoVarSet"><span class="hs-identifier hs-type">TyCoVarSet</span></a></span><span>
</span><span id="line-640"></span><span class="hs-comment">-- Find the type/kind variables free in the type of the id/tyvar</span><span>
</span><span id="line-641"></span><span id="varTypeTyCoVars"><span class="annot"><span class="annottext">varTypeTyCoVars :: Var -&gt; VarSet
</span><a href="GHC.Core.FVs.html#varTypeTyCoVars"><span class="hs-identifier hs-var hs-var">varTypeTyCoVars</span></a></span></span><span> </span><span id="local-6989586621680851794"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851794"><span class="hs-identifier hs-var">var</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; FV -&gt; VarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#varTypeTyCoFVs"><span class="hs-identifier hs-var">varTypeTyCoFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851794"><span class="hs-identifier hs-var">var</span></a></span><span>
</span><span id="line-642"></span><span>
</span><span id="line-643"></span><span class="annot"><a href="GHC.Core.FVs.html#dVarTypeTyCoVars"><span class="hs-identifier hs-type">dVarTypeTyCoVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DTyCoVarSet"><span class="hs-identifier hs-type">DTyCoVarSet</span></a></span><span>
</span><span id="line-644"></span><span class="hs-comment">-- Find the type/kind/coercion variables free in the type of the id/tyvar</span><span>
</span><span id="line-645"></span><span id="dVarTypeTyCoVars"><span class="annot"><span class="annottext">dVarTypeTyCoVars :: Var -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#dVarTypeTyCoVars"><span class="hs-identifier hs-var hs-var">dVarTypeTyCoVars</span></a></span></span><span> </span><span id="local-6989586621680851792"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851792"><span class="hs-identifier hs-var">var</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; DVarSet
</span><a href="GHC.Utils.FV.html#fvDVarSet"><span class="hs-identifier hs-var">fvDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; DVarSet) -&gt; FV -&gt; DVarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#varTypeTyCoFVs"><span class="hs-identifier hs-var">varTypeTyCoFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851792"><span class="hs-identifier hs-var">var</span></a></span><span>
</span><span id="line-646"></span><span>
</span><span id="line-647"></span><span class="annot"><a href="GHC.Core.FVs.html#varTypeTyCoFVs"><span class="hs-identifier hs-type">varTypeTyCoFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-648"></span><span id="varTypeTyCoFVs"><span class="annot"><span class="annottext">varTypeTyCoFVs :: Var -&gt; FV
</span><a href="GHC.Core.FVs.html#varTypeTyCoFVs"><span class="hs-identifier hs-var hs-var">varTypeTyCoFVs</span></a></span></span><span> </span><span id="local-6989586621680851791"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851791"><span class="hs-identifier hs-var">var</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; FV
</span><a href="GHC.Core.TyCo.FVs.html#tyCoFVsOfType"><span class="hs-identifier hs-var">tyCoFVsOfType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; Type
</span><a href="GHC.Types.Var.html#varType"><span class="hs-identifier hs-var hs-var">varType</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851791"><span class="hs-identifier hs-var">var</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-649"></span><span>
</span><span id="line-650"></span><span class="annot"><a href="GHC.Core.FVs.html#idFreeVars"><span class="hs-identifier hs-type">idFreeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-651"></span><span id="idFreeVars"><span class="annot"><span class="annottext">idFreeVars :: Var -&gt; VarSet
</span><a href="GHC.Core.FVs.html#idFreeVars"><span class="hs-identifier hs-var hs-var">idFreeVars</span></a></span></span><span> </span><span id="local-6989586621680851789"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851789"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isId</span><span> </span><span class="hs-identifier">id</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">fvVarSet</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">idFVs</span><span> </span><span class="hs-identifier">id</span><span>
</span><span id="line-652"></span><span>
</span><span id="line-653"></span><span class="annot"><a href="GHC.Core.FVs.html#dIdFreeVars"><span class="hs-identifier hs-type">dIdFreeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>
</span><span id="line-654"></span><span id="dIdFreeVars"><span class="annot"><span class="annottext">dIdFreeVars :: Var -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#dIdFreeVars"><span class="hs-identifier hs-var hs-var">dIdFreeVars</span></a></span></span><span> </span><span id="local-6989586621680851783"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851783"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; DVarSet
</span><a href="GHC.Utils.FV.html#fvDVarSet"><span class="hs-identifier hs-var">fvDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; DVarSet) -&gt; FV -&gt; DVarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#idFVs"><span class="hs-identifier hs-var">idFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851783"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-655"></span><span>
</span><span id="line-656"></span><span class="annot"><a href="GHC.Core.FVs.html#idFVs"><span class="hs-identifier hs-type">idFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-657"></span><span class="hs-comment">-- Type variables, rule variables, and inline variables</span><span>
</span><span id="line-658"></span><span id="idFVs"><span class="annot"><span class="annottext">idFVs :: Var -&gt; FV
</span><a href="GHC.Core.FVs.html#idFVs"><span class="hs-identifier hs-var hs-var">idFVs</span></a></span></span><span> </span><span id="local-6989586621680851782"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851782"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isId</span><span> </span><span class="hs-identifier">id</span><span class="hs-special">)</span><span>
</span><span id="line-659"></span><span>           </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#varTypeTyCoFVs"><span class="hs-identifier hs-var">varTypeTyCoFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851782"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">FV -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#unionFV"><span class="hs-operator hs-var">`unionFV`</span></a></span><span>
</span><span id="line-660"></span><span>           </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#bndrRuleAndUnfoldingFVs"><span class="hs-identifier hs-var">bndrRuleAndUnfoldingFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851782"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-661"></span><span>
</span><span id="line-662"></span><span class="annot"><a href="GHC.Core.FVs.html#bndrRuleAndUnfoldingVarsDSet"><span class="hs-identifier hs-type">bndrRuleAndUnfoldingVarsDSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>
</span><span id="line-663"></span><span id="bndrRuleAndUnfoldingVarsDSet"><span class="annot"><span class="annottext">bndrRuleAndUnfoldingVarsDSet :: Var -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#bndrRuleAndUnfoldingVarsDSet"><span class="hs-identifier hs-var hs-var">bndrRuleAndUnfoldingVarsDSet</span></a></span></span><span> </span><span id="local-6989586621680851781"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851781"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; DVarSet
</span><a href="GHC.Utils.FV.html#fvDVarSet"><span class="hs-identifier hs-var">fvDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; DVarSet) -&gt; FV -&gt; DVarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#bndrRuleAndUnfoldingFVs"><span class="hs-identifier hs-var">bndrRuleAndUnfoldingFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851781"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-664"></span><span>
</span><span id="line-665"></span><span class="annot"><a href="GHC.Core.FVs.html#bndrRuleAndUnfoldingFVs"><span class="hs-identifier hs-type">bndrRuleAndUnfoldingFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-666"></span><span id="bndrRuleAndUnfoldingFVs"><span class="annot"><span class="annottext">bndrRuleAndUnfoldingFVs :: Var -&gt; FV
</span><a href="GHC.Core.FVs.html#bndrRuleAndUnfoldingFVs"><span class="hs-identifier hs-var hs-var">bndrRuleAndUnfoldingFVs</span></a></span></span><span> </span><span id="local-6989586621680851780"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851780"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-667"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isId"><span class="hs-identifier hs-var">isId</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851780"><span class="hs-identifier hs-var">id</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#idRuleFVs"><span class="hs-identifier hs-var">idRuleFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851780"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">FV -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#unionFV"><span class="hs-operator hs-var">`unionFV`</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#idUnfoldingFVs"><span class="hs-identifier hs-var">idUnfoldingFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851780"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-668"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV
</span><a href="GHC.Utils.FV.html#emptyFV"><span class="hs-identifier hs-var">emptyFV</span></a></span><span>
</span><span id="line-669"></span><span>
</span><span id="line-670"></span><span class="annot"><a href="GHC.Core.FVs.html#idRuleVars"><span class="hs-identifier hs-type">idRuleVars</span></a></span><span> </span><span class="hs-glyph">::</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>  </span><span class="hs-comment">-- Does *not* include CoreUnfolding vars</span><span>
</span><span id="line-671"></span><span id="idRuleVars"><span class="annot"><span class="annottext">idRuleVars :: Var -&gt; VarSet
</span><a href="GHC.Core.FVs.html#idRuleVars"><span class="hs-identifier hs-var hs-var">idRuleVars</span></a></span></span><span> </span><span id="local-6989586621680851777"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851777"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; FV -&gt; VarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#idRuleFVs"><span class="hs-identifier hs-var">idRuleFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851777"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-672"></span><span>
</span><span id="line-673"></span><span class="annot"><a href="GHC.Core.FVs.html#idRuleFVs"><span class="hs-identifier hs-type">idRuleFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-674"></span><span id="idRuleFVs"><span class="annot"><span class="annottext">idRuleFVs :: Var -&gt; FV
</span><a href="GHC.Core.FVs.html#idRuleFVs"><span class="hs-identifier hs-var hs-var">idRuleFVs</span></a></span></span><span> </span><span id="local-6989586621680851776"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851776"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isId</span><span> </span><span class="hs-identifier">id</span><span class="hs-special">)</span><span>
</span><span id="line-675"></span><span>  </span><span class="annot"><span class="annottext">[Var] -&gt; FV
</span><a href="GHC.Utils.FV.html#mkFVs"><span class="hs-identifier hs-var">FV.mkFVs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DVarSet -&gt; [Var]
</span><a href="GHC.Types.Var.Set.html#dVarSetElems"><span class="hs-identifier hs-var">dVarSetElems</span></a></span><span> </span><span class="annot"><span class="annottext">(DVarSet -&gt; [Var]) -&gt; DVarSet -&gt; [Var]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RuleInfo -&gt; DVarSet
</span><a href="GHC.Types.Id.Info.html#ruleInfoFreeVars"><span class="hs-identifier hs-var">ruleInfoFreeVars</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; RuleInfo
</span><a href="GHC.Types.Id.html#idSpecialisation"><span class="hs-identifier hs-var">idSpecialisation</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851776"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-676"></span><span>
</span><span id="line-677"></span><span class="annot"><a href="GHC.Core.FVs.html#idUnfoldingVars"><span class="hs-identifier hs-type">idUnfoldingVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-678"></span><span class="hs-comment">-- Produce free vars for an unfolding, but NOT for an ordinary</span><span>
</span><span id="line-679"></span><span class="hs-comment">-- (non-inline) unfolding, since it is a dup of the rhs</span><span>
</span><span id="line-680"></span><span class="hs-comment">-- and we'll get exponential behaviour if we look at both unf and rhs!</span><span>
</span><span id="line-681"></span><span class="hs-comment">-- But do look at the *real* unfolding, even for loop breakers, else</span><span>
</span><span id="line-682"></span><span class="hs-comment">-- we might get out-of-scope variables</span><span>
</span><span id="line-683"></span><span id="idUnfoldingVars"><span class="annot"><span class="annottext">idUnfoldingVars :: Var -&gt; VarSet
</span><a href="GHC.Core.FVs.html#idUnfoldingVars"><span class="hs-identifier hs-var hs-var">idUnfoldingVars</span></a></span></span><span> </span><span id="local-6989586621680851772"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851772"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; FV -&gt; VarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#idUnfoldingFVs"><span class="hs-identifier hs-var">idUnfoldingFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851772"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-684"></span><span>
</span><span id="line-685"></span><span class="annot"><a href="GHC.Core.FVs.html#idUnfoldingFVs"><span class="hs-identifier hs-type">idUnfoldingFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-686"></span><span id="idUnfoldingFVs"><span class="annot"><span class="annottext">idUnfoldingFVs :: Var -&gt; FV
</span><a href="GHC.Core.FVs.html#idUnfoldingFVs"><span class="hs-identifier hs-var hs-var">idUnfoldingFVs</span></a></span></span><span> </span><span id="local-6989586621680851771"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851771"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unfolding -&gt; Maybe FV
</span><a href="GHC.Core.FVs.html#stableUnfoldingFVs"><span class="hs-identifier hs-var">stableUnfoldingFVs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; Unfolding
</span><a href="GHC.Types.Id.html#realIdUnfolding"><span class="hs-identifier hs-var">realIdUnfolding</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851771"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe FV -&gt; FV -&gt; FV
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="annot"><span class="annottext">FV
</span><a href="GHC.Utils.FV.html#emptyFV"><span class="hs-identifier hs-var">emptyFV</span></a></span><span>
</span><span id="line-687"></span><span>
</span><span id="line-688"></span><span class="annot"><a href="GHC.Core.FVs.html#stableUnfoldingVars"><span class="hs-identifier hs-type">stableUnfoldingVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#Unfolding"><span class="hs-identifier hs-type">Unfolding</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-689"></span><span id="stableUnfoldingVars"><span class="annot"><span class="annottext">stableUnfoldingVars :: Unfolding -&gt; Maybe VarSet
</span><a href="GHC.Core.FVs.html#stableUnfoldingVars"><span class="hs-identifier hs-var hs-var">stableUnfoldingVars</span></a></span></span><span> </span><span id="local-6989586621680851768"><span class="annot"><span class="annottext">Unfolding
</span><a href="#local-6989586621680851768"><span class="hs-identifier hs-var">unf</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; VarSet
</span><a href="GHC.Utils.FV.html#fvVarSet"><span class="hs-identifier hs-var">fvVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; VarSet) -&gt; Maybe FV -&gt; Maybe VarSet
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">Unfolding -&gt; Maybe FV
</span><a href="GHC.Core.FVs.html#stableUnfoldingFVs"><span class="hs-identifier hs-var">stableUnfoldingFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Unfolding
</span><a href="#local-6989586621680851768"><span class="hs-identifier hs-var">unf</span></a></span><span>
</span><span id="line-690"></span><span>
</span><span id="line-691"></span><span class="annot"><a href="GHC.Core.FVs.html#stableUnfoldingFVs"><span class="hs-identifier hs-type">stableUnfoldingFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#Unfolding"><span class="hs-identifier hs-type">Unfolding</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.FV.html#FV"><span class="hs-identifier hs-type">FV</span></a></span><span>
</span><span id="line-692"></span><span id="stableUnfoldingFVs"><span class="annot"><span class="annottext">stableUnfoldingFVs :: Unfolding -&gt; Maybe FV
</span><a href="GHC.Core.FVs.html#stableUnfoldingFVs"><span class="hs-identifier hs-var hs-var">stableUnfoldingFVs</span></a></span></span><span> </span><span id="local-6989586621680851767"><span class="annot"><span class="annottext">Unfolding
</span><a href="#local-6989586621680851767"><span class="hs-identifier hs-var">unf</span></a></span></span><span>
</span><span id="line-693"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Unfolding
</span><a href="#local-6989586621680851767"><span class="hs-identifier hs-var">unf</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-694"></span><span>      </span><span class="annot"><a href="GHC.Core.html#CoreUnfolding"><span class="hs-identifier hs-type">CoreUnfolding</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">uf_tmpl :: Unfolding -&gt; CoreExpr
</span><a href="GHC.Core.html#uf_tmpl"><span class="hs-identifier hs-var">uf_tmpl</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851764"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851764"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">uf_src :: Unfolding -&gt; UnfoldingSource
</span><a href="GHC.Core.html#uf_src"><span class="hs-identifier hs-var">uf_src</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851762"><span class="annot"><span class="annottext">UnfoldingSource
</span><a href="#local-6989586621680851762"><span class="hs-identifier hs-var">src</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-695"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">UnfoldingSource -&gt; Bool
</span><a href="GHC.Core.html#isStableSource"><span class="hs-identifier hs-var">isStableSource</span></a></span><span> </span><span class="annot"><span class="annottext">UnfoldingSource
</span><a href="#local-6989586621680851762"><span class="hs-identifier hs-var">src</span></a></span><span>
</span><span id="line-696"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FV -&gt; Maybe FV
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalVar"><span class="hs-identifier hs-var">isLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; FV
</span><a href="GHC.Core.FVs.html#expr_fvs"><span class="hs-identifier hs-var">expr_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851764"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-697"></span><span>      </span><span class="annot"><a href="GHC.Core.html#DFunUnfolding"><span class="hs-identifier hs-type">DFunUnfolding</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">df_bndrs :: Unfolding -&gt; [Var]
</span><a href="GHC.Core.html#df_bndrs"><span class="hs-identifier hs-var">df_bndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851758"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851758"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">df_args :: Unfolding -&gt; [CoreExpr]
</span><a href="GHC.Core.html#df_args"><span class="hs-identifier hs-var">df_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680851756"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680851756"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-698"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FV -&gt; Maybe FV
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InterestingVarFun -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#filterFV"><span class="hs-identifier hs-var">filterFV</span></a></span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalVar"><span class="hs-identifier hs-var">isLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; FV -&gt; FV
</span><a href="GHC.Utils.FV.html#delFVs"><span class="hs-identifier hs-var">FV.delFVs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var] -&gt; VarSet
</span><a href="GHC.Types.Var.Set.html#mkVarSet"><span class="hs-identifier hs-var">mkVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851758"><span class="hs-identifier hs-var">bndrs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(FV -&gt; FV) -&gt; FV -&gt; FV
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr] -&gt; FV
</span><a href="GHC.Core.FVs.html#exprs_fvs"><span class="hs-identifier hs-var">exprs_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680851756"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-699"></span><span>            </span><span class="hs-comment">-- DFuns are top level, so no fvs from types of bndrs</span><span>
</span><span id="line-700"></span><span>      </span><span id="local-6989586621680851753"><span class="annot"><span class="annottext">Unfolding
</span><a href="#local-6989586621680851753"><span class="hs-identifier hs-var">_other</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe FV
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-701"></span><span>
</span><span id="line-702"></span><span>
</span><span id="line-703"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Free variables (and types)}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-710"></span><span>
</span><span id="line-711"></span><span class="annot"><a href="GHC.Core.FVs.html#freeVarsBind"><span class="hs-identifier hs-type">freeVarsBind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreBind"><span class="hs-identifier hs-type">CoreBind</span></a></span><span>
</span><span id="line-712"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>                     </span><span class="hs-comment">-- Free vars of scope of binding</span><span>
</span><span id="line-713"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.FVs.html#CoreBindWithFVs"><span class="hs-identifier hs-type">CoreBindWithFVs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- Return free vars of binding + scope</span><span>
</span><span id="line-714"></span><span id="freeVarsBind"><span class="annot"><span class="annottext">freeVarsBind :: CoreBind -&gt; DVarSet -&gt; (CoreBindWithFVs, DVarSet)
</span><a href="GHC.Core.FVs.html#freeVarsBind"><span class="hs-identifier hs-var hs-var">freeVarsBind</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-type">NonRec</span></a></span><span> </span><span id="local-6989586621680851752"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851752"><span class="hs-identifier hs-var">binder</span></a></span></span><span> </span><span id="local-6989586621680851751"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851751"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680851750"><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851750"><span class="hs-identifier hs-var">body_fvs</span></a></span></span><span>
</span><span id="line-715"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">Var -&gt; CoreExprWithFVs -&gt; CoreBindWithFVs
forall bndr annot. bndr -&gt; AnnExpr bndr annot -&gt; AnnBind bndr annot
</span><a href="GHC.Core.html#AnnNonRec"><span class="hs-identifier hs-var">AnnNonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851752"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851748"><span class="hs-identifier hs-var">rhs2</span></a></span><span>
</span><span id="line-716"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851748"><span class="hs-identifier hs-var">rhs2</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-operator hs-var">`unionFVs`</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851747"><span class="hs-identifier hs-var">body_fvs2</span></a></span><span>
</span><span id="line-717"></span><span>                      </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-operator hs-var">`unionFVs`</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#bndrRuleAndUnfoldingVarsDSet"><span class="hs-identifier hs-var">bndrRuleAndUnfoldingVarsDSet</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851752"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-718"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-719"></span><span>      </span><span id="local-6989586621680851748"><span class="annot"><span class="annottext">rhs2 :: CoreExprWithFVs
</span><a href="#local-6989586621680851748"><span class="hs-identifier hs-var hs-var">rhs2</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExprWithFVs
</span><a href="GHC.Core.FVs.html#freeVars"><span class="hs-identifier hs-var">freeVars</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851751"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-720"></span><span>      </span><span id="local-6989586621680851747"><span class="annot"><span class="annottext">body_fvs2 :: DVarSet
</span><a href="#local-6989586621680851747"><span class="hs-identifier hs-var hs-var">body_fvs2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851752"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#delBinderFV"><span class="hs-operator hs-var">`delBinderFV`</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851750"><span class="hs-identifier hs-var">body_fvs</span></a></span><span>
</span><span id="line-721"></span><span>
</span><span id="line-722"></span><span class="annot"><a href="GHC.Core.FVs.html#freeVarsBind"><span class="hs-identifier hs-var">freeVarsBind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-type">Rec</span></a></span><span> </span><span id="local-6989586621680851746"><span class="annot"><span class="annottext">[(Var, CoreExpr)]
</span><a href="#local-6989586621680851746"><span class="hs-identifier hs-var">binds</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680851745"><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851745"><span class="hs-identifier hs-var">body_fvs</span></a></span></span><span>
</span><span id="line-723"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">[(Var, CoreExprWithFVs)] -&gt; CoreBindWithFVs
forall bndr annot.
[(bndr, AnnExpr bndr annot)] -&gt; AnnBind bndr annot
</span><a href="GHC.Core.html#AnnRec"><span class="hs-identifier hs-var">AnnRec</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851743"><span class="hs-identifier hs-var">binders</span></a></span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; [CoreExprWithFVs] -&gt; [(Var, CoreExprWithFVs)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-operator hs-var">`zip`</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExprWithFVs]
</span><a href="#local-6989586621680851742"><span class="hs-identifier hs-var">rhss2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-724"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#delBindersFV"><span class="hs-identifier hs-var">delBindersFV</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851743"><span class="hs-identifier hs-var">binders</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851741"><span class="hs-identifier hs-var">all_fvs</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-725"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-726"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680851743"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851743"><span class="hs-identifier hs-var">binders</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680851740"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680851740"><span class="hs-identifier hs-var">rhss</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Var, CoreExpr)] -&gt; ([Var], [CoreExpr])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="annot"><span class="annottext">[(Var, CoreExpr)]
</span><a href="#local-6989586621680851746"><span class="hs-identifier hs-var">binds</span></a></span><span>
</span><span id="line-727"></span><span>    </span><span id="local-6989586621680851742"><span class="annot"><span class="annottext">rhss2 :: [CoreExprWithFVs]
</span><a href="#local-6989586621680851742"><span class="hs-identifier hs-var hs-var">rhss2</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExprWithFVs) -&gt; [CoreExpr] -&gt; [CoreExprWithFVs]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExprWithFVs
</span><a href="GHC.Core.FVs.html#freeVars"><span class="hs-identifier hs-var">freeVars</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680851740"><span class="hs-identifier hs-var">rhss</span></a></span><span>
</span><span id="line-728"></span><span>    </span><span id="local-6989586621680851737"><span class="annot"><span class="annottext">rhs_body_fvs :: DVarSet
</span><a href="#local-6989586621680851737"><span class="hs-identifier hs-var hs-var">rhs_body_fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExprWithFVs -&gt; DVarSet -&gt; DVarSet)
-&gt; DVarSet -&gt; [CoreExprWithFVs] -&gt; DVarSet
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-identifier hs-var">unionFVs</span></a></span><span> </span><span class="annot"><span class="annottext">(DVarSet -&gt; DVarSet -&gt; DVarSet)
-&gt; (CoreExprWithFVs -&gt; DVarSet)
-&gt; CoreExprWithFVs
-&gt; DVarSet
-&gt; DVarSet
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851745"><span class="hs-identifier hs-var">body_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExprWithFVs]
</span><a href="#local-6989586621680851742"><span class="hs-identifier hs-var">rhss2</span></a></span><span>
</span><span id="line-729"></span><span>    </span><span id="local-6989586621680851736"><span class="annot"><span class="annottext">binders_fvs :: DVarSet
</span><a href="#local-6989586621680851736"><span class="hs-identifier hs-var hs-var">binders_fvs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FV -&gt; DVarSet
</span><a href="GHC.Utils.FV.html#fvDVarSet"><span class="hs-identifier hs-var">fvDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">(FV -&gt; DVarSet) -&gt; FV -&gt; DVarSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Var -&gt; FV) -&gt; [Var] -&gt; FV
forall a. (a -&gt; FV) -&gt; [a] -&gt; FV
</span><a href="GHC.Utils.FV.html#mapUnionFV"><span class="hs-identifier hs-var">mapUnionFV</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; FV
</span><a href="GHC.Core.FVs.html#bndrRuleAndUnfoldingFVs"><span class="hs-identifier hs-var">bndrRuleAndUnfoldingFVs</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851743"><span class="hs-identifier hs-var">binders</span></a></span><span>
</span><span id="line-730"></span><span>                   </span><span class="hs-comment">-- See Note [The FVAnn invariant]</span><span>
</span><span id="line-731"></span><span>    </span><span id="local-6989586621680851741"><span class="annot"><span class="annottext">all_fvs :: DVarSet
</span><a href="#local-6989586621680851741"><span class="hs-identifier hs-var hs-var">all_fvs</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851737"><span class="hs-identifier hs-var">rhs_body_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-operator hs-var">`unionFVs`</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851736"><span class="hs-identifier hs-var">binders_fvs</span></a></span><span>
</span><span id="line-732"></span><span>            </span><span class="hs-comment">-- The &quot;delBinderFV&quot; happens after adding the idSpecVars,</span><span>
</span><span id="line-733"></span><span>            </span><span class="hs-comment">-- since the latter may add some of the binders as fvs</span><span>
</span><span id="line-734"></span><span>
</span><span id="line-735"></span><span class="annot"><a href="GHC.Core.FVs.html#freeVars"><span class="hs-identifier hs-type">freeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs"><span class="hs-identifier hs-type">CoreExprWithFVs</span></a></span><span>
</span><span id="line-736"></span><span class="hs-comment">-- ^ Annotate a 'CoreExpr' with its (non-global) free type</span><span>
</span><span id="line-737"></span><span class="hs-comment">--   and value variables at every tree node.</span><span>
</span><span id="line-738"></span><span id="freeVars"><span class="annot"><span class="annottext">freeVars :: CoreExpr -&gt; CoreExprWithFVs
</span><a href="GHC.Core.FVs.html#freeVars"><span class="hs-identifier hs-var hs-var">freeVars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExprWithFVs
</span><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-739"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-740"></span><span>    </span><span class="annot"><a href="#local-6989586621680851735"><span class="hs-identifier hs-type">go</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs"><span class="hs-identifier hs-type">CoreExprWithFVs</span></a></span><span>
</span><span id="line-741"></span><span>    </span><span id="local-6989586621680851735"><span class="annot"><span class="annottext">go :: CoreExpr -&gt; CoreExprWithFVs
</span><a href="#local-6989586621680851735"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span id="local-6989586621680851734"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851734"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-742"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">InterestingVarFun
</span><a href="GHC.Types.Var.html#isLocalVar"><span class="hs-identifier hs-var">isLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851734"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#aFreeVar"><span class="hs-identifier hs-var">aFreeVar</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851734"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-operator hs-var">`unionFVs`</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851733"><span class="hs-identifier hs-var">ty_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-operator hs-var">`unionFVs`</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851732"><span class="hs-identifier hs-var">mult_vars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var -&gt; AnnExpr' Var DVarSet
forall bndr annot. Var -&gt; AnnExpr' bndr annot
</span><a href="GHC.Core.html#AnnVar"><span class="hs-identifier hs-var">AnnVar</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851734"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-743"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DVarSet
</span><a href="GHC.Types.Var.Set.html#emptyDVarSet"><span class="hs-identifier hs-var">emptyDVarSet</span></a></span><span class="hs-special">,</span><span>                 </span><span class="annot"><span class="annottext">Var -&gt; AnnExpr' Var DVarSet
forall bndr annot. Var -&gt; AnnExpr' bndr annot
</span><a href="GHC.Core.html#AnnVar"><span class="hs-identifier hs-var">AnnVar</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851734"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-744"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-745"></span><span>        </span><span id="local-6989586621680851732"><span class="annot"><span class="annottext">mult_vars :: DVarSet
</span><a href="#local-6989586621680851732"><span class="hs-identifier hs-var hs-var">mult_vars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; DVarSet
</span><a href="GHC.Core.TyCo.FVs.html#tyCoVarsOfTypeDSet"><span class="hs-identifier hs-var">tyCoVarsOfTypeDSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; Type
</span><a href="GHC.Types.Var.html#varMult"><span class="hs-identifier hs-var hs-var">varMult</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851734"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-746"></span><span>        </span><span id="local-6989586621680851733"><span class="annot"><span class="annottext">ty_fvs :: DVarSet
</span><a href="#local-6989586621680851733"><span class="hs-identifier hs-var hs-var">ty_fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#dVarTypeTyCoVars"><span class="hs-identifier hs-var">dVarTypeTyCoVars</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851734"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-747"></span><span>                 </span><span class="hs-comment">-- See Note [The FVAnn invariant]</span><span>
</span><span id="line-748"></span><span>
</span><span id="line-749"></span><span>    </span><span class="annot"><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Lit"><span class="hs-identifier hs-type">Lit</span></a></span><span> </span><span id="local-6989586621680851727"><span class="annot"><span class="annottext">Literal
</span><a href="#local-6989586621680851727"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DVarSet
</span><a href="GHC.Types.Var.Set.html#emptyDVarSet"><span class="hs-identifier hs-var">emptyDVarSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Literal -&gt; AnnExpr' Var DVarSet
forall bndr annot. Literal -&gt; AnnExpr' bndr annot
</span><a href="GHC.Core.html#AnnLit"><span class="hs-identifier hs-var">AnnLit</span></a></span><span> </span><span class="annot"><span class="annottext">Literal
</span><a href="#local-6989586621680851727"><span class="hs-identifier hs-var">lit</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-750"></span><span>    </span><span class="annot"><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Lam"><span class="hs-identifier hs-type">Lam</span></a></span><span> </span><span id="local-6989586621680851725"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851725"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621680851724"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851724"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-751"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851723"><span class="hs-identifier hs-var">b_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-operator hs-var">`unionFVs`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851725"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#delBinderFV"><span class="hs-operator hs-var">`delBinderFV`</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851722"><span class="hs-identifier hs-var">body_fvs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-752"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var -&gt; CoreExprWithFVs -&gt; AnnExpr' Var DVarSet
forall bndr annot.
bndr -&gt; AnnExpr bndr annot -&gt; AnnExpr' bndr annot
</span><a href="GHC.Core.html#AnnLam"><span class="hs-identifier hs-var">AnnLam</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851725"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851720"><span class="hs-identifier hs-var">body'</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-753"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-754"></span><span>        </span><span id="local-6989586621680851720"><span class="annot"><span class="annottext">body' :: CoreExprWithFVs
</span><a href="#local-6989586621680851720"><span class="hs-identifier hs-var">body'</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621680851722"><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851722"><span class="hs-identifier hs-var">body_fvs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">AnnExpr' Var DVarSet
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExprWithFVs
</span><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851724"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-755"></span><span>        </span><span id="local-6989586621680851719"><span class="annot"><span class="annottext">b_ty :: Type
</span><a href="#local-6989586621680851719"><span class="hs-identifier hs-var hs-var">b_ty</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851725"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-756"></span><span>        </span><span id="local-6989586621680851723"><span class="annot"><span class="annottext">b_fvs :: DVarSet
</span><a href="#local-6989586621680851723"><span class="hs-identifier hs-var hs-var">b_fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; DVarSet
</span><a href="GHC.Core.TyCo.FVs.html#tyCoVarsOfTypeDSet"><span class="hs-identifier hs-var">tyCoVarsOfTypeDSet</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851719"><span class="hs-identifier hs-var">b_ty</span></a></span><span>
</span><span id="line-757"></span><span>                </span><span class="hs-comment">-- See Note [The FVAnn invariant]</span><span>
</span><span id="line-758"></span><span>
</span><span id="line-759"></span><span>    </span><span class="annot"><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#App"><span class="hs-identifier hs-type">App</span></a></span><span> </span><span id="local-6989586621680851717"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851717"><span class="hs-identifier hs-var">fun</span></a></span></span><span> </span><span id="local-6989586621680851716"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851716"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-760"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851715"><span class="hs-identifier hs-var">fun'</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-operator hs-var">`unionFVs`</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851714"><span class="hs-identifier hs-var">arg'</span></a></span><span>
</span><span id="line-761"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; CoreExprWithFVs -&gt; AnnExpr' Var DVarSet
forall bndr annot.
AnnExpr bndr annot -&gt; AnnExpr bndr annot -&gt; AnnExpr' bndr annot
</span><a href="GHC.Core.html#AnnApp"><span class="hs-identifier hs-var">AnnApp</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851715"><span class="hs-identifier hs-var">fun'</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851714"><span class="hs-identifier hs-var">arg'</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-762"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-763"></span><span>        </span><span id="local-6989586621680851715"><span class="annot"><span class="annottext">fun' :: CoreExprWithFVs
</span><a href="#local-6989586621680851715"><span class="hs-identifier hs-var hs-var">fun'</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExprWithFVs
</span><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851717"><span class="hs-identifier hs-var">fun</span></a></span><span>
</span><span id="line-764"></span><span>        </span><span id="local-6989586621680851714"><span class="annot"><span class="annottext">arg' :: CoreExprWithFVs
</span><a href="#local-6989586621680851714"><span class="hs-identifier hs-var hs-var">arg'</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExprWithFVs
</span><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851716"><span class="hs-identifier hs-var">arg</span></a></span><span>
</span><span id="line-765"></span><span>
</span><span id="line-766"></span><span>    </span><span class="annot"><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Case"><span class="hs-identifier hs-type">Case</span></a></span><span> </span><span id="local-6989586621680851712"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851712"><span class="hs-identifier hs-var">scrut</span></a></span></span><span> </span><span id="local-6989586621680851711"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851711"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span id="local-6989586621680851710"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851710"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680851709"><span class="annot"><span class="annottext">[Alt Var]
</span><a href="#local-6989586621680851709"><span class="hs-identifier hs-var">alts</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-767"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851711"><span class="hs-identifier hs-var">bndr</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#delBinderFV"><span class="hs-operator hs-var">`delBinderFV`</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851708"><span class="hs-identifier hs-var">alts_fvs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-768"></span><span>           </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-operator hs-var">`unionFVs`</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851707"><span class="hs-identifier hs-var">scrut2</span></a></span><span>
</span><span id="line-769"></span><span>           </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-operator hs-var">`unionFVs`</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; DVarSet
</span><a href="GHC.Core.TyCo.FVs.html#tyCoVarsOfTypeDSet"><span class="hs-identifier hs-var">tyCoVarsOfTypeDSet</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851710"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-770"></span><span>          </span><span class="hs-comment">-- Don't need to look at (idType bndr)</span><span>
</span><span id="line-771"></span><span>          </span><span class="hs-comment">-- because that's redundant with scrut</span><span>
</span><span id="line-772"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
-&gt; Var -&gt; Type -&gt; [AnnAlt Var DVarSet] -&gt; AnnExpr' Var DVarSet
forall bndr annot.
AnnExpr bndr annot
-&gt; bndr -&gt; Type -&gt; [AnnAlt bndr annot] -&gt; AnnExpr' bndr annot
</span><a href="GHC.Core.html#AnnCase"><span class="hs-identifier hs-var">AnnCase</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851707"><span class="hs-identifier hs-var">scrut2</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680851711"><span class="hs-identifier hs-var">bndr</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851710"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnAlt Var DVarSet]
</span><a href="#local-6989586621680851705"><span class="hs-identifier hs-var">alts2</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-773"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-774"></span><span>        </span><span id="local-6989586621680851707"><span class="annot"><span class="annottext">scrut2 :: CoreExprWithFVs
</span><a href="#local-6989586621680851707"><span class="hs-identifier hs-var hs-var">scrut2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExprWithFVs
</span><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851712"><span class="hs-identifier hs-var">scrut</span></a></span><span>
</span><span id="line-775"></span><span>
</span><span id="line-776"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621680851704"><span class="annot"><span class="annottext">[DVarSet]
</span><a href="#local-6989586621680851704"><span class="hs-identifier hs-var">alts_fvs_s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680851705"><span class="annot"><span class="annottext">[AnnAlt Var DVarSet]
</span><a href="#local-6989586621680851705"><span class="hs-identifier hs-var">alts2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Alt Var -&gt; (DVarSet, AnnAlt Var DVarSet))
-&gt; [Alt Var] -&gt; ([DVarSet], [AnnAlt Var DVarSet])
forall a b c. (a -&gt; (b, c)) -&gt; [a] -&gt; ([b], [c])
</span><a href="GHC.Utils.Misc.html#mapAndUnzip"><span class="hs-identifier hs-var">mapAndUnzip</span></a></span><span> </span><span class="annot"><span class="annottext">Alt Var -&gt; (DVarSet, AnnAlt Var DVarSet)
forall {a}.
(a, [Var], CoreExpr) -&gt; (DVarSet, (a, [Var], CoreExprWithFVs))
</span><a href="#local-6989586621680851702"><span class="hs-identifier hs-var">fv_alt</span></a></span><span> </span><span class="annot"><span class="annottext">[Alt Var]
</span><a href="#local-6989586621680851709"><span class="hs-identifier hs-var">alts</span></a></span><span>
</span><span id="line-777"></span><span>        </span><span id="local-6989586621680851708"><span class="annot"><span class="annottext">alts_fvs :: DVarSet
</span><a href="#local-6989586621680851708"><span class="hs-identifier hs-var hs-var">alts_fvs</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[DVarSet] -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVss"><span class="hs-identifier hs-var">unionFVss</span></a></span><span> </span><span class="annot"><span class="annottext">[DVarSet]
</span><a href="#local-6989586621680851704"><span class="hs-identifier hs-var">alts_fvs_s</span></a></span><span>
</span><span id="line-778"></span><span>
</span><span id="line-779"></span><span>        </span><span id="local-6989586621680851702"><span class="annot"><span class="annottext">fv_alt :: (a, [Var], CoreExpr) -&gt; (DVarSet, (a, [Var], CoreExprWithFVs))
</span><a href="#local-6989586621680851702"><span class="hs-identifier hs-var hs-var">fv_alt</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680851701"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680851701"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680851700"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851700"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680851699"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851699"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var] -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#delBindersFV"><span class="hs-identifier hs-var">delBindersFV</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851700"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851698"><span class="hs-identifier hs-var">rhs2</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-780"></span><span>                                 </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680851701"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851700"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851698"><span class="hs-identifier hs-var">rhs2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-781"></span><span>                              </span><span class="hs-keyword">where</span><span>
</span><span id="line-782"></span><span>                                 </span><span id="local-6989586621680851698"><span class="annot"><span class="annottext">rhs2 :: CoreExprWithFVs
</span><a href="#local-6989586621680851698"><span class="hs-identifier hs-var hs-var">rhs2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExprWithFVs
</span><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851699"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-783"></span><span>
</span><span id="line-784"></span><span>    </span><span class="annot"><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Let"><span class="hs-identifier hs-type">Let</span></a></span><span> </span><span id="local-6989586621680851697"><span class="annot"><span class="annottext">CoreBind
</span><a href="#local-6989586621680851697"><span class="hs-identifier hs-var">bind</span></a></span></span><span> </span><span id="local-6989586621680851696"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851696"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-785"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851695"><span class="hs-identifier hs-var">bind_fvs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreBindWithFVs -&gt; CoreExprWithFVs -&gt; AnnExpr' Var DVarSet
forall bndr annot.
AnnBind bndr annot -&gt; AnnExpr bndr annot -&gt; AnnExpr' bndr annot
</span><a href="GHC.Core.html#AnnLet"><span class="hs-identifier hs-var">AnnLet</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBindWithFVs
</span><a href="#local-6989586621680851693"><span class="hs-identifier hs-var">bind2</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851692"><span class="hs-identifier hs-var">body2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-786"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-787"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621680851693"><span class="annot"><span class="annottext">CoreBindWithFVs
</span><a href="#local-6989586621680851693"><span class="hs-identifier hs-var">bind2</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680851695"><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851695"><span class="hs-identifier hs-var">bind_fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreBind -&gt; DVarSet -&gt; (CoreBindWithFVs, DVarSet)
</span><a href="GHC.Core.FVs.html#freeVarsBind"><span class="hs-identifier hs-var">freeVarsBind</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBind
</span><a href="#local-6989586621680851697"><span class="hs-identifier hs-var">bind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851692"><span class="hs-identifier hs-var">body2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-788"></span><span>        </span><span id="local-6989586621680851692"><span class="annot"><span class="annottext">body2 :: CoreExprWithFVs
</span><a href="#local-6989586621680851692"><span class="hs-identifier hs-var hs-var">body2</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExprWithFVs
</span><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851696"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-789"></span><span>
</span><span id="line-790"></span><span>    </span><span class="annot"><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Cast"><span class="hs-identifier hs-type">Cast</span></a></span><span> </span><span id="local-6989586621680851691"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851691"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621680851690"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851690"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-791"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851689"><span class="hs-identifier hs-var">expr2</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-operator hs-var">`unionFVs`</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851688"><span class="hs-identifier hs-var">cfvs</span></a></span><span>
</span><span id="line-792"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; (DVarSet, Coercion) -&gt; AnnExpr' Var DVarSet
forall bndr annot.
AnnExpr bndr annot -&gt; (annot, Coercion) -&gt; AnnExpr' bndr annot
</span><a href="GHC.Core.html#AnnCast"><span class="hs-identifier hs-var">AnnCast</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851689"><span class="hs-identifier hs-var">expr2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DVarSet
</span><a href="#local-6989586621680851688"><span class="hs-identifier hs-var">cfvs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851690"><span class="hs-identifier hs-var">co</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-793"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-794"></span><span>        </span><span id="local-6989586621680851689"><span class="annot"><span class="annottext">expr2 :: CoreExprWithFVs
</span><a href="#local-6989586621680851689"><span class="hs-identifier hs-var hs-var">expr2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExprWithFVs
</span><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851691"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-795"></span><span>        </span><span id="local-6989586621680851688"><span class="annot"><span class="annottext">cfvs :: DVarSet
</span><a href="#local-6989586621680851688"><span class="hs-identifier hs-var hs-var">cfvs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; DVarSet
</span><a href="GHC.Core.TyCo.FVs.html#tyCoVarsOfCoDSet"><span class="hs-identifier hs-var">tyCoVarsOfCoDSet</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851690"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-796"></span><span>
</span><span id="line-797"></span><span>    </span><span class="annot"><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span id="local-6989586621680851685"><span class="annot"><span class="annottext">Tickish Var
</span><a href="#local-6989586621680851685"><span class="hs-identifier hs-var">tickish</span></a></span></span><span> </span><span id="local-6989586621680851684"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851684"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-798"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">Tickish Var -&gt; DVarSet
</span><a href="#local-6989586621680851683"><span class="hs-identifier hs-var">tickishFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish Var
</span><a href="#local-6989586621680851685"><span class="hs-identifier hs-var">tickish</span></a></span><span> </span><span class="annot"><span class="annottext">DVarSet -&gt; DVarSet -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#unionFVs"><span class="hs-operator hs-var">`unionFVs`</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; DVarSet
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851682"><span class="hs-identifier hs-var">expr2</span></a></span><span>
</span><span id="line-799"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Tickish Var -&gt; CoreExprWithFVs -&gt; AnnExpr' Var DVarSet
forall bndr annot.
Tickish Var -&gt; AnnExpr bndr annot -&gt; AnnExpr' bndr annot
</span><a href="GHC.Core.html#AnnTick"><span class="hs-identifier hs-var">AnnTick</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish Var
</span><a href="#local-6989586621680851685"><span class="hs-identifier hs-var">tickish</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680851682"><span class="hs-identifier hs-var">expr2</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-800"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-801"></span><span>        </span><span id="local-6989586621680851682"><span class="annot"><span class="annottext">expr2 :: CoreExprWithFVs
</span><a href="#local-6989586621680851682"><span class="hs-identifier hs-var hs-var">expr2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExprWithFVs
</span><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680851684"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-802"></span><span>        </span><span id="local-6989586621680851683"><span class="annot"><span class="annottext">tickishFVs :: Tickish Var -&gt; DVarSet
</span><a href="#local-6989586621680851683"><span class="hs-identifier hs-var hs-var">tickishFVs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Breakpoint"><span class="hs-identifier hs-type">Breakpoint</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680851680"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851680"><span class="hs-identifier hs-var">ids</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; DVarSet
</span><a href="GHC.Types.Var.Set.html#mkDVarSet"><span class="hs-identifier hs-var">mkDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680851680"><span class="hs-identifier hs-var">ids</span></a></span><span>
</span><span id="line-803"></span><span>        </span><span class="annot"><a href="#local-6989586621680851683"><span class="hs-identifier hs-var">tickishFVs</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish Var
</span><span class="hs-identifier">_</span></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DVarSet
</span><a href="GHC.Types.Var.Set.html#emptyDVarSet"><span class="hs-identifier hs-var">emptyDVarSet</span></a></span><span>
</span><span id="line-804"></span><span>
</span><span id="line-805"></span><span>    </span><span class="annot"><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span id="local-6989586621680851678"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851678"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; DVarSet
</span><a href="GHC.Core.TyCo.FVs.html#tyCoVarsOfTypeDSet"><span class="hs-identifier hs-var">tyCoVarsOfTypeDSet</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851678"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type -&gt; AnnExpr' Var DVarSet
forall bndr annot. Type -&gt; AnnExpr' bndr annot
</span><a href="GHC.Core.html#AnnType"><span class="hs-identifier hs-var">AnnType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680851678"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-806"></span><span>    </span><span class="annot"><a href="#local-6989586621680851735"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span> </span><span id="local-6989586621680851676"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851676"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion -&gt; DVarSet
</span><a href="GHC.Core.TyCo.FVs.html#tyCoVarsOfCoDSet"><span class="hs-identifier hs-var">tyCoVarsOfCoDSet</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851676"><span class="hs-identifier hs-var">co</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; AnnExpr' Var DVarSet
forall bndr annot. Coercion -&gt; AnnExpr' bndr annot
</span><a href="GHC.Core.html#AnnCoercion"><span class="hs-identifier hs-var">AnnCoercion</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680851676"><span class="hs-identifier hs-var">co</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-807"></span></pre></body></html>